Window.open as modal popup?

后端 未结 4 782
北海茫月
北海茫月 2021-01-04 23:06

I want open window.open as modal popup.

 var features = \'resizable= yes; status= no; scroll= no; help= no; center= yes;
 width=460;height=140;         


        
4条回答
  •  再見小時候
    2021-01-04 23:27

    I agree with both previous answers. Basically, you want to use what is known as a "lightbox" - http://en.wikipedia.org/wiki/Lightbox_(JavaScript)

    It is essentially a div than is created within the DOM of your current window/tab. In addition to the div that contains your dialog, a transparent overlay blocks the user from engaging all underlying elements. This can effectively create a modal dialog (i.e. user MUST make some kind of decision before moving on).

提交回复
热议问题