<head>
<script>
function openWindow(url)
{
window.force = new ForceWindow();
window.force.pop(url);
//var myWindow = new ForceWindow();
//myWindow.pop(url);
}
function ForceWindow()
{
this.r = document.documentElement;
this.f = document.createElement("FORM");
this.f.target = "_blank";
this.f.method = "post";
this.r.insertBefore(this.f, this.r.childNodes[0]);
}
ForceWindow.prototype.pop = function(sUrl)
{
this.f.action = sUrl;
this.f.submit();
}
function xclick()
{
alert(1);
openWindow("http://www.baidu.com");
}
</script>
</head>
<body>
<P>111</P>
<input type="button" value="测试" οnclick='xclick()' />
</body>
<script>
function openWindow(url)
{
window.force = new ForceWindow();
window.force.pop(url);
//var myWindow = new ForceWindow();
//myWindow.pop(url);
}
function ForceWindow()
{
this.r = document.documentElement;
this.f = document.createElement("FORM");
this.f.target = "_blank";
this.f.method = "post";
this.r.insertBefore(this.f, this.r.childNodes[0]);
}
ForceWindow.prototype.pop = function(sUrl)
{
this.f.action = sUrl;
this.f.submit();
}
function xclick()
{
alert(1);
openWindow("http://www.baidu.com");
}
</script>
</head>
<body>
<P>111</P>
<input type="button" value="测试" οnclick='xclick()' />
</body>