使select 元素不能修改的问题 document.all.item("ee").onchange=function(){document.all.item("ee").selectedIndex=1} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <select name= "ee" onchange="this.selectedIndex=1">document.all.item("ee").onchange="this.selectedIndex=1"; this 取值范围不同 onchange="this.selectedIndex=1"里的this代表在<select></select>里document.all.item("ee").onchange="this.selectedIndex=1";写在JS里 this表示意思就是window页面.所以是错的 因为你第一个this 和第二个 this 所指的对象不同 谢谢大家的回复我用document.all.item("ee").onchange=function(){document.all.item("ee").selectedIndex=1}这样好像还是不行JaggerLee 说的也是,犯了个低级错误我现在这样用了document.all.item("ee").onclick=function(){alert("不能修改的元素!");return;} 小小问题。怎么让窗口不能拉伸 怎样 js 动态添加id js遍历数组如何实现? js 问题 DIV 的内容替换导致两次请求? 如何调用javascript中写的函数 javascript 暂停功能 如何用javascript检验是否输入的是浮点数 求大牛围观 请教各位大侠:怎样动态地设置iframe的高度为src中指定页面的高度,从而使iframe中不出现纵向滚动条就能看到嵌入的完整内容? 如何用document.getElementById()的方法得到单选按钮组的值,你知道就快说吧 关于判断响应时间问题,谢谢!
document.all.item("ee").onchange="this.selectedIndex=1";
this 取值范围不同 onchange="this.selectedIndex=1"里的this代表在<select></select>里
document.all.item("ee").onchange="this.selectedIndex=1";
写在JS里 this表示意思就是window页面.所以是错的
我用document.all.item("ee").onchange=function(){document.all.item("ee").selectedIndex=1}这样好像还是不行
JaggerLee 说的也是,犯了个低级错误
我现在这样用了
document.all.item("ee").onclick=function(){alert("不能修改的元素!");return;}