<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>全选反选 &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/tag/%E5%85%A8%E9%80%89%E5%8F%8D%E9%80%89/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Mon, 01 Oct 2012 10:23:35 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.1</generator>
	<item>
		<title>Javascript全选反选函数</title>
		<link>https://www.mudbest.com/javascript%e5%85%a8%e9%80%89%e5%8f%8d%e9%80%89%e5%87%bd%e6%95%b0/</link>
		
		<dc:creator><![CDATA[hkshadow]]></dc:creator>
		<pubDate>Thu, 28 Apr 2011 09:45:13 +0000</pubDate>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[全选反选]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=616</guid>

					<description><![CDATA[Js函数部分.. HTML演示部分..]]></description>
										<content:encoded><![CDATA[<p>Js函数部分..</p>
<pre class="brush: jscript; title: ; notranslate">
//2011-04-28
//by hkshadow
function CheckAll(s,b){
	var a = document.getElementById(s).getElementsByTagName(&quot;input&quot;);
	var selall=document.getElementById(b).checked;
	for (var i=0; i&lt;a.length; i++)
	   if(selall==true){
       		for (var i=0; i&lt;a.length; i++)
	   				if (a&#x5B;i].type == &quot;checkbox&quot;) a&#x5B;i].checked = true;
			 }else{ 		
  				for (var i=0; i&lt;a.length; i++)	
       			if (a&#x5B;i].type == &quot;checkbox&quot;) a&#x5B;i].checked = false ;
			}
	}
</pre>
<p>HTML演示部分..<span id="more-616"></span></p>
<pre class="brush: xml; title: ; notranslate">
                            &lt;ul class=&quot;mix2&quot;&gt;
               &lt;li class=&quot;mix1&quot;&gt;解析几何与高等代数&lt;/li&gt;
               &lt;li class=&quot;mix2&quot;  id=&quot;fk1&quot;&gt;
              
                              &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1996&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202157&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1997&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202158&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1998&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202159&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1999&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202160&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2000&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202161&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2001&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202162&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2002&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202163&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2005&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202164&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2007&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202165&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2007答案&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202166&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2008&#x5B;5元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202167&quot;&gt;
               &lt;/em&gt;
			               
               &lt;em&gt;&lt;span&gt;全选&lt;/span&gt;&amp;nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;all&quot; id=&quot;ok1&quot; onclick=&quot;CheckAll('fk1','ok1')&quot; class=&quot;text&quot;&gt;&lt;/em&gt;
               
               &lt;/li&gt;
              &lt;/ul&gt;
                         &lt;ul class=&quot;mix2&quot;&gt;
               &lt;li class=&quot;mix1&quot;&gt;数学分析&lt;/li&gt;
               &lt;li class=&quot;mix2&quot;  id=&quot;fk2&quot;&gt;
              
                              &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1996&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202149&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1997&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202150&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1998&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202151&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1999&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202152&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2000&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202153&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2001&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202154&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2002&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202155&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2008&#x5B;5元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202156&quot;&gt;
               &lt;/em&gt;
			               
               &lt;em&gt;&lt;span&gt;全选&lt;/span&gt;&amp;nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;all&quot; id=&quot;ok2&quot; onclick=&quot;CheckAll('fk2','ok2')&quot; class=&quot;text&quot;&gt;&lt;/em&gt;
               
               &lt;/li&gt;
              &lt;/ul&gt;
                         &lt;ul class=&quot;mix2&quot;&gt;
               &lt;li class=&quot;mix1&quot;&gt;数学学院专业综合考试&lt;/li&gt;
               &lt;li class=&quot;mix2&quot;  id=&quot;fk3&quot;&gt;
              
                              &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1996&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202168&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1997&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202169&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1998&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202170&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;1999&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202171&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2000&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202172&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2001&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202173&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2002&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202174&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2004&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202175&quot;&gt;
               &lt;/em&gt;
			               &lt;em&gt;
               &lt;a href=&quot;#none&quot; onClick=&quot;alert('缺少页面，未作');&quot;&gt;2005&#x5B;3元]&lt;/a&gt;&amp;nbsp;
               &lt;input type=&quot;checkbox&quot; name=&quot;checks&#x5B;]&quot; class=&quot;text&quot; value=&quot;202176&quot;&gt;
               &lt;/em&gt;
			               
               &lt;em&gt;&lt;span&gt;全选&lt;/span&gt;&amp;nbsp;&lt;input type=&quot;checkbox&quot; name=&quot;all&quot; id=&quot;ok3&quot; onclick=&quot;CheckAll('fk3','ok3')&quot; class=&quot;text&quot;&gt;&lt;/em&gt;
               
               &lt;/li&gt;
              &lt;/ul&gt;
</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
