2014-01-15 74 views

回答

0

的jQuery:

$('input:first-child').on('click',function(){ 
    $('input:not(:first-child)').attr('checked',true) 
}) 

这将更好地工作,如果你添加了一些ID对您的按钮。如现在所写,如果页面上的任何位置有其他输入元素,则可能会产生意想不到的效果。