一般都是写一个 for 遍历设置
解决方案 »
- jquery dt鼠标经过对应dd显示
- 关于js的prototype的问题
- 密码框选中后无法取消
- 请教如何让两个图层鼠标拖动互换
- 在java中s1.equals(""),在javascript中怎么写?
- 下面这段图片轮换显示的滤镜功能,在firefox浏览器下如何修改才能正确显示,这个火狐太讨厌了,郁闷!!
- 如何关闭父窗口后,同时关闭子窗口。
- 这个东西快把我弄疯了,请大家帮帮忙,vml的问题。
- 如何让window.open弹出窗口总在最前!
- 在工具条存在的条件的情况下,如何屏蔽掉后退前进项,或使他们失效呢?菜鸟急需!
- 难道<map>不支持appendChild方法?高手帮解决一下?
- 树接点连接到其他页面的问题
<head>
<style>
input
{
behavior:url('1.htc');
}
</style>
</head>
<body>
<input type="radio" name="RadioButton1" value="1" />
<input type="radio" name="RadioButton1" value="2" />
<input type="radio" name="RadioButton1" value="3" />
<input type="radio" name="RadioButton1" value="4" />
<input type="radio" name="RadioButton1" value="5" />
<input type="radio" name="RadioButton1" value="6" />
<input type="radio" name="RadioButton1" value="7" />
</body>
</html>
1.htc<PUBLIC:ATTACH EVENT="onfocus" ONEVENT="Check()" />
<script language="javascript">
function Check(){
if(this.type=="radio")
alert(this.value);
}
</script>
for(var i=0;i<elements.length;i++){
if(elements[i].type=="radio" || elements[i].type=="checkbox"){
elements[i].onfocus=function(){this.blur();};
}
}
从编程的角度来说,我喜欢用htc,但好像其他浏览器不支持