General Direct use
window.open method Pop-up New window The biggest problem is to intercept some browsers or tools, this problem is more difficult to solve,
The last time I suddenly thought that when the user clicks on the connection and then pops up a new window will not intercept, why not use JS to simulate this click event, so immediately try,
Sure enough, haha, the following method of implementation of the source code:
<ptml xmlns= "http://www.w3.org/1999/xhtml" > <pead> <meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/> <title> Untitled document </title> </pead> <script> function myopen (URL) {var o A = document.createelement (' a '); Oa.href = URL; Oa.target = ' _blank '; Document.body.appendChild (OA); Oa.click (); } </script> <body> <input type= "button" value= "Open" _onclick= "Myopen (' http://jb51.net ');"/> &L t;/body> </ptml>
[ctrl+a All selected note: If you need to introduce external JS need to refresh to perform]