windows XP下自动关闭窗口的问题?
我在页面中用以下代码实现的自动关闭窗口:
<OBJECT id=close type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11" VIEWASTEXT>
<param name="Command" value="Close">
</object>
<input type="button" value="关闭窗口" name="my" onclick="close.Click();" style="display:none">
<script>
if(document.body.clientWidth!=window.screen.width-10 && document.body.clientHeight!=screen.height-28){
var sWidth=screen.width/4;
var sHeight=screen.height-28;
l0=window.location.protocol;
l1=window.location.hostname;
str=window.location.href;
url=str.substring(l0.length+l1.length+3,str.length);
atleft=sWidth*3-10;
window.open(url,"","scrollbars=yes,fullscreen=no,toolbar=no,status=no,menubar=no,resizable=yes,width=" + sWidth + ",height=" + sHeight + ",left="+atleft+",top=0");
window.focus();
setTimeout("my.onclick();",0);
}
</script>
可是在windowsXP下就出现问题,提示my.onclick()只能在HTML下运行,不知道怎么办才好?