欢迎访问:常州市武进区嘉泽中心小学网站 !今天是:
栏目列表
您现在的位置是:首页>>教师>>计算机技术>>网站制作技术>>文章内容
javascript 框架间函数传递
发布时间:2008-11-20   点击:   来源:本站原创   录入者:佚名
 

/*********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>


附件:
    关闭窗口
    打印文档
    账号登录
    保持登录 忘记密码?
    账号与武进教师培训平台同步