私はタグに基づいた古代のプロジェクトに取り組んでいます。
親ページ(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()関数を呼び出すことです。それ、どうやったら出来るの?
前もって感謝します!