首页 > 其他 > 详细

checked

时间:2016-06-27 22:59:40      阅读:156      评论:0      收藏:0      [点我收藏+]

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="jquery.js"></script>

</head>
<body>
<div>
<input type="checkbox" name="fruit"> apple
<input type="checkbox" name="fruit"> orange
<input type="checkbox" name="fruit"> banana
<input type="checkbox" name="fruit"> watermelon<br>
<input type="button" value="I like these fruit!">
</div>

<script>
$(function(){
$("input[type=‘button‘]").click(function() {
alert($("input[type=‘checkbox‘]:checked").length);
});
})

</script>
</body>
</html>

checked

原文:http://www.cnblogs.com/uman/p/5621617.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!