22 四 2010 @ 5:55 下午 

之前写过一篇关于使用js实现全选的BLOG ,可以实现效果 但是是比较笨拙的方法
原文地址:http://www.dyphp.com/?p=316
下面这个方法是是作用jquery实现的效果,当然要选加载jquery.js才行

<script>
    // 全选 
    $(document).ready(
        $(“#cheAll”).toggle(
            function(){
                $(‘input[type="checkbox"]‘).each(function(){
                    $(this).attr(“checked”,true);
                });
            },
            function(){
                $(‘input[type="checkbox"]‘).each(function(){
                    $(this).attr(“checked”,false);
                });
            }
        )
    );
</script>
<input id=”delList_1″ name=”delList[]” type=”checkbox” value=”1″ />
<input id=”delList_2″ name=”delList[]” type=”checkbox” value=”2″ />
<input id=”delList_3″ name=”delList[]” type=”checkbox” value=”3″ />
<input id=”delList_4″ name=”delList[]” type=”checkbox” value=”4″ />
<input id=”delList_5″ name=”delList[]” type=”checkbox” value=”5″ />

Posted By: 大宇
Last Edit: 22 四 2010 @ 05:55 下午

EmailPermalink
Tags
Tags: ,
Categories: jquery, js


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tags
Comment Meta:
RSS Feed for comments

 Last 50 Posts
Change Theme...
  • Users » 1
  • Posts/Pages » 165
  • Comments » 12
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

关于



    No Child Pages.

Linux命令手册



    No Child Pages.

php.ini配置



    No Child Pages.

Memcache协议



    No Child Pages.