Multiple Windows using window.open()

后端 未结 5 1292
無奈伤痛
無奈伤痛 2020-11-29 10:52

So as we all know if you click on a submit button that has embedded in it a onClick(windown.open(...)) this opens a new window with all the lovely attributes yo

相关标签:
5条回答
  • 2020-11-29 11:43

    window.open(url, '', 'width=1000, height=500')

    then, you get new popup every time to click popupbutton.

    0 讨论(0)
  • 2020-11-29 11:45

    Check this this might help you to open new window every time.

    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>jQuery demo</title>
      <script src="jquery-1.9.1.js"></script>
    </head>
    <body>
    
    <script>
    $(document).on("click", "#btn", function(event) {
        window.open("http://www.google.com", '_blank');
    });
    
    </script>
    <input type=button name="btn" id="btn">
    </body>
    </html>
    
    0 讨论(0)
  • 2020-11-29 11:48

    try this,it will create new child, fiddle

    var randomnumber = Math.floor((Math.random()*100)+1); 
     window.open(yoururl,"_blank",'PopUp',randomnumber,'scrollbars=1,menubar=0,resizable=1,width=850,height=500');
    
    0 讨论(0)
  • 2020-11-29 11:51

    Give each window a new window name.

    window.open(url, WindowName)
    
    0 讨论(0)
  • 2020-11-29 11:52

    You need to disable Track outbound links which will open only one window. Add the following javascript code to index.html file:

    <script type="text/javascript">
      var clicky_custom = clicky_custom || {};
      clicky_custom.outbound_disable = 1;
    </script>
    
    0 讨论(0)
提交回复
热议问题