简体   繁体   中英

How to use modalDialog to display pop-up which can work in all browser

I just tried to create pop-up window but its parent window get active while pop-up is still open , in Chome. My code is as blow

<script language="javascript" type="text/javascript">
    function showModalWindow() {
 window.showModalDialog('URL, "Sample.jpg", "resizable: yes");
    }
</script>

how to make this code browser specific.

您可以在调用jQuery dialog()时将modal:true添加到选项中

Try Jquery Pop-up

Go to this link http://www.jquerypopup.com/

window.showModalDialog is part part of standard specification yet which is now been used in HTML5. So it has been ignored in chrome. Use jQuery dialog which has the mask and many other features. Go through this link for the reference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM