87,910
社区成员
发帖
与我相关
我的任务
分享
<head>
<script src="Complex.js"></script>
</head>
<frameset rows="50%,50%">
<frame name="frame1" src="frame1.html">
<frame name="frame2" src="frame2.html">
</frameset>
var Complex = top.Complex;
var c = new Complex(1,2);
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>parent</title>
<script>
var a = window.open("a.htm");
var b = window.open("b.htm");
</script>
</head>
<body>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>a</title>
<script>
function getBfunction(){
alert(window.opener.b.bFunction());
}
</script>
</head>
<body>
<input type="button" onclick="getBfunction()" value="调用b.htm的方法"/>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>b</title>
<script>
function bFunction(){
return "这里是b.htm...";
}
</script>
</head>
<body>
</body>
</html>