简单问题,下拉菜单select怎么能默认状态为index=-1(高分求教). <body onload=document.all.sel.selectedIndex=-1><select name=sel><option>1</option><option>2</option></select> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果我的select名字不确定,因为我的form里面有动态的表格,里面的select 名字可能是select_1,select_2,select_3 ......,该怎么办,怎么能让表单里所有的select的selectedIndex都等于-1,谢谢! <body onload=inital()><script>function inital(){ var sels=document.getElementsByTagName("SELECT"); for(i=0;i<sels.length;i++) sels[i].selectedIndex=-1;}</script><select ><option>1</option><option>2</option></select><select ><option>1</option><option>2</option></select> 如果我用样式引用,让select的selectedIndex=-1该怎么定义哪? <style>select {qswh:expression(selectedIndex=-1)}</style><select ><option>1</option><option>2</option></select><select ><option>1</option><option>2</option></select> 不过这样就没法选了,除非用脚本removeExpression建议用<style>select{behavior:url(1.htc)}</style><select ><option>1</option><option>2</option></select><select ><option>1</option><option>2</option></select>1.htc内容<attach event="oncontentready" handler="doInit" /><script>function doInit() {element.selectedIndex=-1}</script> js对cookie的控制 求助! 绑定事件监听函数 怎样限制全页面的文本框,不能输入某些字符? 一个浮动图片的高级问题 关于java类型转换的,急,高分求~~~~~ 请大家帮忙了,有从北京西->武昌或汉口的硬座或硬卧火车票吗? 大家好﹐有一個小問題。 在JavaScript中建立自己的集合对象? 前端js execCommand 能否插入 FLASH 动画呢?谢谢~~~ 选择大类,子类就显示出来,选择子类,更小的字类就改变,如何实现。先给100,不够再给!
<script>
function inital(){
var sels=document.getElementsByTagName("SELECT");
for(i=0;i<sels.length;i++)
sels[i].selectedIndex=-1;
}
</script>
<select >
<option>1</option>
<option>2</option>
</select>
<select >
<option>1</option>
<option>2</option>
</select>
select {qswh:expression(selectedIndex=-1)}
</style>
<select >
<option>1</option>
<option>2</option>
</select>
<select >
<option>1</option>
<option>2</option>
</select>
<style>select{behavior:url(1.htc)}</style>
<select >
<option>1</option>
<option>2</option>
</select>
<select >
<option>1</option>
<option>2</option>
</select>
1.htc内容
<attach event="oncontentready" handler="doInit" />
<script>function doInit() {element.selectedIndex=-1}</script>