Skip to main content

Bug Tracker

Side navigation

#14437 closed bug (duplicate)

Opened October 11, 2013 06:13AM UTC

Closed October 11, 2013 01:01PM UTC

jq1.10.2 click点击的问题

Reported by: 18210606014@163.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:
Description

我不知道怎么上传图片.而且我的英文真的很差,所以只能复制到这里了

html代码:

<legend>个人基本信息</legend>

<input type="checkbox" name="items" id="" value="足球"/>足球

<input type="checkbox" name="items" id="" value="篮球"/>篮球

<input type="checkbox" name="items" id="" value="羽毛球"/>羽毛球

<input type="checkbox" name="items" id="" value="乒乓球"/>乒乓球

<input type="checkbox" name="items" id="" value="网球"/>网球

<br />

<input type="checkbox" name="" id="CheckAll" />全选/全不选

<input type="button" value="提交" id="send" />

js代码部分

$(document).ready(function() {

$('#CheckAll').click(function(event) {

$('[name=items]:checkbox').attr('checked',this.checked);

});

});

我希望他可以在点击的时候全选,再点击则全不选,但是情况是第一次点击全选,第二次点击全不选,都很正常,但是在以后的点击里,则都是全不选的状态。

Attachments (0)
Change History (1)

Changed October 11, 2013 01:01PM UTC by gibson042 comment:1

resolution: → duplicate
status: newclosed

Duplicate of #13245.