js如何对iframe进行操作?
owowo 2004-09-27 03:16:17 一个页面,内含一个iframe,主页面中有一个下拉菜单,我现在要通过该下拉菜单控制iframe里的页面变换该如何写js调用?
另外我主页面中点击button后,执行js方法,先提交iframe中页面的button该如何写?
主页面
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="Form1" id="Form1" action="Opt.jsp?UserID=<%=UserID%>" method="post">
<p>
<select name="select">
<option value="1.htm" selected>a</option>
<option value="2.htm">b</option>
</select>
</p>
<tr>
<th></th>
<td>
<iframe class="Composition" ID="Composition" style="width:400px;height:200px" src="test.jsp"></iframe>
</td>
</tr>
<input type="submit" name="Submit" value="提交">
</form>
</body>
</html>
1.htm
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<input type="submit" name="Submit" value="提交">
</form>
</body>
</html>