我想从html页面上获得一个checkbox是否checked,
但是不管checkbox是否选中,checkbox.checked的值始终为false!
不知道用什么方法呢?
请大家救我!
---------------------------------------------------------------
把代码贴出来看看
---------------------------------------------------------------
代码?
你的checkbox的name没写错?
---------------------------------------------------------------
我不大明白楼主是怎么把“这一段放在stylesheet中”的?
---------------------------------------------------------------
1<table id="t">
2<tr>
3<td align="center" height="17" width="159">
4<input checked="true" id="aa" name="aa" onclick="test()" type="checkbox"/>
5</td>
6</tr>
7</table>
1<script>
2function test()
3{
4alert(document.all.aa.checked)
5alert(t.rows[0].cells[0].childNodes[0].checked)
6}
7test()
8</script>