判断checkbox 是否被选中
判断checkbox 是否被选中
<html>
<script src=jquery-1.4.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{
$("#ss").click(function()
{
alert($("#login_checkbox").attr("checked"))
})
})
</script>
<input type="checkbox" id="login_checkbox" name="login_checkbox" checked="checked"/>
<button id="ss">aa</button>
</html>
调用的jquery jquery-1.4.4.min.js 版本返回的是 'true' 或 'false'
如果调用其他坂本的则返回checked 或 undefind
浙公网安备 33010602011771号