5.14日学习内容1:jquery表单相关知识

 1 <script>
 2     $comment.animate({height:'+=50'},400);//在原来的基础上加50;
 3     $('.smaller').click(function(){
 4         if(!$comment.is(':animated')){
 5             if($comment.height()>50){
 6                 $comment.animate({height:'-=50'},400);
 7             }
 8         }
 9     })
10     //控制滚动条高度的变化,使文本内容随着滚动
11     $(function(){
12         $('.down').click(function(){
13             if(!$comment.is(':animated')){
14                 $comment.animate({scrollTop:'+=50'},400)
15             }
16         })
17     })
18     // 全选
19     $('#checkedAll').click(function(){
20         $('[name=items]:checkbox').attr('checked',true);
21     })
22     $('#checkedDev').click(function(){
23         $('[name=items]:checkbox').each(function(){
24             this.checked=!this.checked;
25         })
26     })
27     //输出选中项的值
28     $('#checkedVal').click(function(){
29         $('[name=items]:checkbox').each(function(){
30             $(this).val();
31         })
32     })
33 </script>
原文地址:https://www.cnblogs.com/yangguoe/p/9034590.html