简体   繁体   中英

window.open auto new tab not working in chrome

Javascript window.open() auto new tab not working in Google-Chrome and bypass all browser open new tab.

** auto new tab without click button and click link **

echo '<script type="text/javascript">
          window.open("http://www.google.co.th");
      </script>';

** Run for IE "pass"

** Run for Firefox "pass"

** Run for Chrome "fail"

Try this

window.open('http://www.google.co.th','','height=200,width=300');

Chrome will block popup windows on page, until you give him access.

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