请问下面的代码问题在哪里,脚本错误
来源:百度知道 编辑:UC知道 时间:2024/05/26 06:51:45
我想打开11.htm时运行11.htm里的函数callOpinion310,但老提示IF语句错误,不知错在哪里。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<script type="text/JavaScript">
<!--
function callOpinion310()
{
var opn=window.open('11.htm');
var numTimerId;
function CallChildFunc()
{
if (opn.Opinion310)
{
opn.Opinion310();
window.clearInterval (numTimerId);
}
}
numTimerId = window.setInterval(CallChildFunc,10);
}
//-->
</script>
<p><input type="button" value="按钮" name="B3" onclick="callOpinion310()"></p>
</body>
<
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<script type="text/JavaScript">
<!--
function callOpinion310()
{
var opn=window.open('11.htm');
var numTimerId;
function CallChildFunc()
{
if (opn.Opinion310)
{
opn.Opinion310();
window.clearInterval (numTimerId);
}
}
numTimerId = window.setInterval(CallChildFunc,10);
}
//-->
</script>
<p><input type="button" value="按钮" name="B3" onclick="callOpinion310()"></p>
</body>
<
function 嵌套问题
<script type="text/JavaScript">
<!--
function callOpinion310()
{
var opn=window.open('11.htm');
var numTimerId;
numTimerId = window.setInterval(CallChildFunc,10);
}
function CallChildFunc()
{
if (opn.Opinion310)
{
opn.Opinion310();
window.clearInterval (numTimerId);
}
}
//-->
</script>