87,904
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script>
$(function(){
$('#btn').click(function(){
if($('input[name="chk"]').prop("checked"))
{
alert("选中");
}
else
alert('未选中');
});
})
</script>
</head>
<body>
<input type="checkbox" name="chk" />
<input type="button" id="btn" value="判断" />
</body>
</html>