how define z-index of some popup windows?

天大地大妈咪最大 提交于 2019-12-12 01:12:20

问题


i have 4 popup windows -> width:100% and height:100%
is there a way to define z-index of those popup windows?
i want to show their parent at top of it's childs!
how can i do that?

two of my popup windows are like this :

<script type="text/javascript">
    window.open('http://www.MyPoPup1.com', '_blank', 'location=no,menubar=no,scrollbars=yes,resizable=no,toolbar=no');
    window.open('http://www.MyPoPup2.com', '_blank', '');
</script>

thanks in advance


回答1:


You can use the Focus() method

<script type="text/javascript">
var newWin = window.open(...); 
window.focus(); // Will cause parent window to be ON TOP of child window
</script>


来源:https://stackoverflow.com/questions/8462634/how-define-z-index-of-some-popup-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!