Juqery的一些应用1

 function CheckAll(groupID, evt) {            

if (window.event)     //屏蔽父事件响应(例如:点击某一个复选框时,其行事件不响应)

{                

    event.cancelBubble = true;     

} else if (evt) {          

       evt.stopPropagation();       

}

if ($("#" + groupID).attr('checked')) {

       $("#blueprint" + groupID.substring(6)).find(':checkbox').each(             

                function () {                      

                      $(this).attr('checked', 'checked');  

                }                

       );            

} else {                

      $("#blueprint" + groupID.substring(6)).find(':checkbox').each(                    

            function () {                        

               $(this).attr('checked', '');                    

            }                 

      );            

}        

}

posted on 2013-08-09 10:59  紫叶嵋  阅读(174)  评论(0编辑  收藏  举报