javascript 框架之间 函数传递

时间:2010-04-11 19:22:49  来源:第二电脑网  作者:第二电脑网

  第二电脑网导读:/></head> <frameset cols="80,*" frameborder="NO" border="0" framespacing="0"> <frame src="left.htm" name="leftFrame" scrolling="NO" noresize> <frame src="right.htm" name="mainFrame"> </frameset> <nofra...
  正文:

*********index.htm*******

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Untitled Document</title>
</head>

<frameset cols="80,*" frameborder="NO" border="0" framespacing="0">
<frame src="left.htm" name="leftFrame" scrolling="NO" noresize>
<frame src="right.htm" name="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>

************left.htm
<html>
<body>
<input type="submit" name="Submit" value="Submit" onClick="testFunc('hello')">

<script language="JavaScript">
function testFunc(args){
parent.mainFrame.rightFunc(args);
}
</script>
</body>
</html>

/*********right.htm
<html>
<body>

<script language="javascript">
function rightFunc(args){
alert(args);
}
</script>
</body>
</html>

"javascript 框架之间 函数传递"由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Programming/JavaScript/13574.html


关键字:

关于《javascript 框架之间 函数传递》文章的评论

站内搜索: 高级搜索

热门搜索: Windows style 系统 tr IP QQ CPU 安装 function 注册 if td