Disable IE menu while displaying a custom dialog

2019-03-05 13:52发布

问题:

Is there a way to disable IE's UI (e.g. the File Menu) when showing a custom dialog/window? What I'm after is similar to what happens when you alert() something: the browser UI cannot be interacted with behind the alert box.

回答1:

What you want is called a dialog, and JQuery has a good one.



回答2:

Unfortunately what you want isn't going to be possible. alert and confirm both (1) pause the currently executing javascript and (2) act as modal dialogs for the browser. There is no other way to simulate this behavior.