Hide IE toolbar

xiaoxiao2021-03-18  192

Case: The system is ASP.NET project, C # encoding, and the window uniform use IE Dialog, the developer's purpose is to specify the user's operational process because the business process is very strict, and there is no branch operation. But the problem is that IE Dialog does not minimize buttons, the application is displayed. Since the user's machine is not a simple business operation terminal, the minimization button is required to switch out of the application and do other work.

Workaround: Using a normal IE window, use scripts to hide the toolbar that may bring security hidden dangers, such as IE Dialog.

The idea is as follows:

Introduced blank form WebForm1, open WebForm2, and control the WebForm2 hidden toolbar, turn off WebForm1 while opening WebForm1.

To do this, add the following code in the HTML of WebForm:

1. Add online = "closeform1 ()", οnunlοad = "navigate ()" in Body

2. Add a Closeform1 () and NaviGate () method to the NaviGate () method in Script:

Function closeform1 () {

WINDOW.OPENER = "X"

Self.close ()

}

Function navigate () {

Window.Open ("Webform2.aspx",

"", "Toolbar = NO, Location = no, Directories = no, menubar = no, scrollbars = no, resizable = yes, status = no, top = 0, left = 0")

}

转载请注明原文地址:https://www.9cbs.com/read-129988.html

New Post(0)