框架网页中使用js的问题
一个框架网页,框架中包含一个a.htm和一个b.htm,a.htm里有一个textarea文本域,b.htm里有一个按钮,当b.htm单击按钮后,想在a.htm中的文本域里的内容变成aaa.
郁闷死了```>_<
问题点数:10、回复次数:2Top
1 楼moodboy1982(老鹰)回复于 2005-11-04 22:16:16 得分 0
这个不用JS就可以实现。
但是要用ASP。Top
2 楼rawjim(快速结帖是我在CSDN上追求的)回复于 2005-11-06 01:30:41 得分 10
<!--main.htm-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>main.htm</title>
</head>
<frameset rows="200,*" frameborder="NO" border="1" framespacing="0">
<frame src="a.htm" name="topFrame" scrolling="NO" noresize >
<frame src="b.htm" name="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>
<!--a.htm-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>a.htm</title>
</head>
<body>
<input type="text" name="txt1">
</body>
</html>
<!--b.htm-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>b.htm</title>
</head>
<body>
<input type="button" value="OK" onClick="window.parent.topFrame.txt1.value='aaa'">
</body>
</html>
Top




