window.open不被拦截

某页面中button按钮事件写代码如下:
string Str1="http://www.sohu.com/";
Response.Write("<script>window.open('" + Str1 + "','_blank');window.showModalDialog('close.htm');</script>");


close.htm文件 代码为
<html>
<body  onload="window.parent.opener=null;window.close();">
</body>
</html>

你可能感兴趣的:(window.open)