如何清除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对象与继承教程之内置对象(上)。 js移除tbody问题? 有人用过EsFtp 的控件吗?有点问题 document.domain和designMode问题 表格的每个单元个设置不同的图片 如何使与自身并行的iframe窗口后退? [a,b,c]数组转化成json{a:"",b:"",c:""} 我做的一棵树时,弹出的一个脚本提示,大家看看 我要感谢给我回答问题的人wangxj0600(wamgxj0600),但我不知如何给分:) 打开新窗口的方法——请先看看要求 关于读本机的文件内容问题 字符串判断问题
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>