|
阅读:1975回复:2
Firefox下判断checkbox是否被选中怎么实现?
Firefox下判断checkbox是否被选中怎么实现?
在IE里可以用这种方式: if(document.getElementById("transmit").checked) 请问在Firefox里怎么判断呢? |
|
|
|
1楼#
发布于:2009-04-28 18:47
不是一样的么
<html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-cn" />
<head>
<script type="text/javascript">
function check()
{
if (document.getElementById("myCheck").checked)
{
alert('Checkd!');
}
else
{
alert('Not Checkd!');
}
}
</script>
</head>
<body>
<form>
<input type="checkbox" id="myCheck" />
<input type="button" onclick="check()" value="选定?" />
</form>
</body>
</html> |
|
|
|
2楼#
发布于:2009-04-28 18:47
怎么没人回复啊!
难道这个问题这么难吗? |
|
|