我正在研究一个基于和标签的古老项目。
以下是父页面 (index.html) 的常见 HTML 结构:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
</head>
<frameset rows="75px,*" frameborder="0">
<frame name="frame1" src="frames/frame1.html">
<frameset class="child_frameset">
<frame name="frame3" src="frames/frame3.html">
</frameset>
</frameset>
</html>
在这里,我如何在子框架(frame3.html)上指定 javascript 函数:
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript">
function helloWorld(){
alert('hello world!');
}
</script>
</head>
<body>
<h1>I'm frame 3</h1>
</body>
</html>
我的任务是调用helloWorld()函数。我怎么做?
提前致谢!