问题
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