JS为什么这样会报错?
两个文件:
<a.asp>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>三</title>
<link href="css/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<input type="button" value="pre" onclick="preview();">
</body>
<script language="javascript">
function preview() {
openwin = window.open("b.asp","_blank");
openwin.document.body.innerHTML="aaaa";
}
</script>
</html>
<b.asp>
<html>
<body>
<table>
<tr><td>dddd</td></tr>
</table>
</body>
</html>
为什么会报openwin.document.body为空或不是对象?