Making a window pop under in chrome

前端 未结 8 1363
攒了一身酷
攒了一身酷 2020-12-03 05:55

I have a button that needs to open a new window as a popup (under the parent page). In IE/Firefox, it works fine, but in chrome the popup appears over (on top of) the parent

8条回答
  •  悲&欢浪女
    2020-12-03 06:33

    I take back my comment, is possible.

    The following worked for me. (tested latest production chrome)

    var url = "yourURL.html";
    window.open(url, "s", "width= 640, height= 480, left=0, top=0, resizable=yes, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no").blur();
    window.focus();
    

    Like all things, if you annoy your visitors you will have less visitors.

提交回复
热议问题