如何清除List中的选项? Netscape不支持iframe你上面的界面在Netscape下能显示吗?你用哪个版本的? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是的,netscape好像还不支持框架ie下document.aform.a.length=0可以清除下拉列表 楼上两位,我用的netscape7.0、7.1都支持框架的。 <select id=s1><option>a</option></select><script>document.getElementById('s1').length = 0;</script>清空这样是可以的,在netscape7.1下试过 javaScript代码是在main.htm里写的,是右边的List清空,而不是本身的清空。 1.html<html><body><iframe id=a src="a.html"></iframe><iframe id=b src="b.html"></iframe><input type=button onclick="document.getElementById('a').contentWindow.document.getElementById('s1').length=0" value="clear s1"></body></html>a.html<html><body>s1<select id=s1><option>a</option></select><input type=button onclick="window.parent.document.getElementById('b').contentWindow.document.getElementById('s2').length=0" value="clear s2"></body></html>b.html<html><body>s2<select id=s2><option>a</option></select></body></html> javascript不能控制flash播放 讨论:这个提示是什么原因导致的 自由拖拉DIV 求教规则表达式 请问JavaScript是否可以实现客户端与服务器端的通讯或者远程调用? 请教SOHU的打印部分页面功能怎么做的 怎么样onClick一个<tr>,使得<tr>中的<td>中的radio button被选中? 想学习activex在ie方面的应用,该怎么入门,最好能介绍一些可供下载的资料,谢谢!! 如何用js判断输入框提交的内容第一个和最后一个不能为".",中间的内容为英文字母? 怎样取得页面中所有文本域的值??? 关于读本机的文件内容问题 字符串判断问题
ie下
document.aform.a.length=0
可以清除下拉列表
<option>a</option>
</select>
<script>
document.getElementById('s1').length = 0;
</script>
清空这样是可以的,在netscape7.1下试过
<html>
<body>
<iframe id=a src="a.html">
</iframe>
<iframe id=b src="b.html">
</iframe>
<input type=button onclick="document.getElementById('a').contentWindow.document.getElementById('s1').length=0" value="clear s1">
</body>
</html>a.html
<html>
<body>
s1
<select id=s1>
<option>a</option>
</select>
<input type=button onclick="window.parent.document.getElementById('b').contentWindow.document.getElementById('s2').length=0" value="clear s2">
</body>
</html>b.html
<html>
<body>
s2
<select id=s2>
<option>a</option>
</select>
</body>
</html>