不好意思,上面漏了一句:
这里是补充
p=window.open("","","width=200,height=200");
p.document.write("OK");
上面这段代码在win2000中能执行,在XP中为什么会提示“缺少对象”.
这里是补充
p=window.open("","","width=200,height=200");
p.document.write("OK");
上面这段代码在win2000中能执行,在XP中为什么会提示“缺少对象”.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function test(){
var p=window.open("","","width=200,height=200");
p.document.write("OK");
}
</script>
</head><body>
<input type="button" value="del" onclick="test();" />
</body>
</html>
p.document.write("OK"); xp下没问题。你用alert(); 检查下