Javascript在新窗口打开新标签测试。目前只能打开新窗口,却在父窗口中打开了新标签,继续测试ing
[php]<SCRIPT>
<!--
var newwindow = window.open("","mywindow","width=250,height=250");
newwindow.document.open()
newwindow.document.write("<h1>新窗口打开新标签test</h1><a id=\"a1\" href=\"http://www.opensoce.com/files/endecode.htm\" target=\"_blank\">endecode</a><br /><a id=\"a2\" href=\"http://www.sina.com.cn\" target=\"_blank\">sina</a><br /><script type=\"text/javascript\">var $ = function(id){return document.getElementById(id);};$(\"a1\").click();$(\"a2\").click();</script>");
newwindow.document.write("<p>you are welcome</p>");
newwindow.document.close();
-->
</SCRIPT> [/php]