1.如果是在前台用超链接如<a href="javascript:window.open('webAdress.aspx ')"></a>打开新页面时会弹出一个内容页为object的页面,解决方案是调用下面的OpenWin()可以防止这种现象<a href="javascript:OpenWin('webAdress.aspx ',300,200)"></a>,具体原因还不是很清楚。
2.如果是在逻辑层打开,如在一个Button的事件里面写:
ClientScript.RegisterStartupScript(GetType (),"","<script>window.open('webAdress.aspx ');</script>");
这样不会弹出内容页为object的页面。
<script language="javascript" type="text/javascript">
function OpenWin(Url,width,height)
{
var hdc=window.open(Url,"_blank", 'width='+ width + ',height=' + height);
var swidth=screen.width;
var sheight=screen.height;
hdc.moveTo((swidth-width)/2,(sheight-height)/2);
}
</script>
在IE7下面测试的