If you press window. Close () on a page that is not opened by JS, there will be a prompt box, which is annoying. Now you don't need it. Close the window without a prompt box.
Try the following:Code:
<Object ID = "webbrowser" width = 0 Height = 0 classid = "CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2">
</Object>
<Input type = "button" name = "button" value = "Close Window" onclick = "document. All. webbrowser. execwb (45,1)">
If you try to change the parameters, you will get some other functions:
Webbrowser. execwb () Open
Webbrowser. execwb () Close all existing IE Windows and open a new window
Webbrowser. execwb () Save the webpage
Webbrowser. execwb (6, 1) print
Webbrowser. execwb (7,1) print preview
Webbrowser. execwb (8, 1) print page settings
Webbrowser. execwb (10, 1) view page properties
Webbrowser. execwb () seems to be undo, to be confirmed
Select All webbrowser. execwb (17,1)
Webbrowser. execwb (22, 1) Refresh
Webbrowser. execwb () Close form no prompt
These are only valid for ie5.5 and later versions. I tested them in IE6 and passed them.