我的主页面:----index.html----------
<frameset cols="20%,*">
<frame name="left" src="left.html" action="main" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
<frame name="main" src="main.html" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
</frameset>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
<head>
<title>Admin Interface</title>
</head><body></body>
</html>
-------------main--------html
<form name="form1" methods='post'>
<input type=text name="username" value="" id="user_name">
</form>
---left.html---
<input type="button" name="fibona" value="fibona" onclick="this.parent.main.form1.user_name.value=this.value">也可以通地<a href 等的onclick>
左边就是显示出你的用户名不管你用什么元素显示只要给它加上一个onclick然后通过onclick的onclick="this.parent.main.form1.user_name.value=this.value">也可以通过onclick调用一个js函数来实现
<frameset cols="20%,*">
<frame name="left" src="left.html" action="main" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
<frame name="main" src="main.html" marginwidth="10" marginheight="10" scrolling="auto" frameborder="0">
</frameset>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
<head>
<title>Admin Interface</title>
</head><body></body>
</html>
-------------main--------html
<form name="form1" methods='post'>
<input type=text name="username" value="" id="user_name">
</form>
---left.html---
<input type="button" name="fibona" value="fibona" onclick="this.parent.main.form1.user_name.value=this.value">也可以通地<a href 等的onclick>
左边就是显示出你的用户名不管你用什么元素显示只要给它加上一个onclick然后通过onclick的onclick="this.parent.main.form1.user_name.value=this.value">也可以通过onclick调用一个js函数来实现
<frame src="top.htm" name="topFrame">
<frame src="bottom.htm" name="bottomFrame">
</frameset>top.htm<input type="text" name="txt">bottom.htm<a href="#" onclick="top.frames['topFrame'].document.all.txt.value=this.innerText">灰豆宝宝.net</a>