<?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>等待-放飞梦想 &#187; 评论</title>
	<atom:link href="http://leotheme.cn/tag/%e8%af%84%e8%ae%ba/feed" rel="self" type="application/rss+xml" />
	<link>http://leotheme.cn</link>
	<description>勤现在-乐将来</description>
	<lastBuildDate>Tue, 07 Feb 2012 07:06:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress评论表单验证</title>
		<link>http://leotheme.cn/wordpress/wordpress-comment-form-proof.html</link>
		<comments>http://leotheme.cn/wordpress/wordpress-comment-form-proof.html#comments</comments>
		<pubDate>Sat, 28 Nov 2009 02:50:40 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[WP相关]]></category>
		<category><![CDATA[前端交互]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[表单]]></category>
		<category><![CDATA[评论]]></category>
		<category><![CDATA[验证]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=772</guid>
		<description><![CDATA[wordpress的评论只是个很简单的表单。WP本身也有一个自身的验证系统。但自带的这个验证是基于后台的验证。当表单不符合规格时跳转到另一个页面。我们需要返回上一页才能继续填写表单。这样对于用户的体验并不友好；所以一个基于前端的验证很需要。大家平时也一定有见过各种各样的表单验证。有些表单的验证很复杂，也很强大。不过WP的验证很简单。只需要验证“昵称”、“E-mail”、和评论就行了。http地址因为不是必须的。所以只需要在用户有输入的情况下判断下地址是否符合正常的格式就行了。来看下这个简单的验证效果： 下面来说说这个简单的表单验证。当然，还是基于jQuery的。 var Msg = new Array( &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;用户名不能为空&#34;, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;昵称不能少于3个字符&#34;, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;E-mail地址不能为空&#34;, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;请输入正确的E-Mail地址&#34;, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#34;url地址不正确&#34;, &#160; &#160; &#160; [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题高级技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-hacks.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题高级技巧</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>wordpress的评论只是个很简单的表单。WP本身也有一个自身的验证系统。但自带的这个验证是基于后台的验证。当表单不符合规格时跳转到另一个页面。我们需要返回上一页才能继续填写表单。这样对于用户的体验并不友好；所以一个基于前端的验证很需要。大家平时也一定有见过各种各样的表单验证。有些表单的验证很复杂，也很强大。不过WP的验证很简单。只需要验证“昵称”、“E-mail”、和评论就行了。http地址因为不是必须的。所以只需要在用户有输入的情况下判断下地址是否符合正常的格式就行了。来看下这个简单的验证效果：<br />
<span id="more-772"></span><br />
<img src="http://leotheme.cn/wp-content/uploads/2009/11/form1.png" alt="form1" title="form1" width="589" height="134" /></p>
<p><img src="http://leotheme.cn/wp-content/uploads/2009/11/form2.png" alt="form2" title="form2" width="590" height="137" /></p>
<p><img src="http://leotheme.cn/wp-content/uploads/2009/11/form3.png" alt="form3" title="form3" width="588" height="135" /><br />
下面来说说这个简单的表单验证。当然，还是基于jQuery的。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Green;">var</span><span style="color: Gray;"> </span><span style="color: Blue;">Msg</span><span style="color: Gray;"> = </span><span style="color: Green;">new</span><span style="color: Gray;"> </span><span style="color: Teal;">Array</span><span style="color: Olive;">(</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">用户名不能为空</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">昵称不能少于3个字符</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">E-mail地址不能为空</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">请输入正确的E-Mail地址</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">url地址不正确</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">评论内容不能少于5个字符</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">输入正确</span><span style="color: #8b0000;">&quot;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li></ol></div>
<p>首先定义一个提示信息的数组。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">is</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">#author</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">next</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">remove</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">==</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onError&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">0</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">.</span><span style="color: Blue;">length</span><span style="color: Gray;"> &lt; </span><span style="color: Maroon;">3</span><span style="color: Gray;"> </span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onError&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">1</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onok&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">6</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li></ol></div>
<p>验证昵称：如果用户输入的字符为空，或少于3个。刚显示相应的错误信息，否则显示输入正确。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #ffa500;">//验证邮件地址</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">is</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">#email</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">next</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">remove</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">==</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onError&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">2</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> </span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">!=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> &amp;&amp; !</span><span style="color: #8b0000;">/</span><span style="color: Red;">^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$</span><span style="color: #8b0000;">/</span><span style="color: Gray;">.</span><span style="color: Blue;">test</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Olive;">)){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onError&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">3</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">else</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onok&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">6</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li></ol></div>
<p>验证E-mail地址：和验证昵称一样。这里是用正则去匹配地址是否正确；</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #ffa500;">//验证url</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">is</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">#url</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">&nbsp;</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">next</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">remove</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Gray;">!=</span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;"> &amp;&amp; !</span><span style="color: #8b0000;">/</span><span style="color: Red;">^http:</span><span style="color: Navy;">\/\/</span><span style="color: Red;">[A-Za-z0-9]+\.[A-Za-z0-9]+[</span><span style="color: Navy;">\/</span><span style="color: Red;">=\?%\-&amp;_~`@[\]\':+!]*([^&lt;&gt;\&quot;\&quot;])*$</span><span style="color: #8b0000;">/</span><span style="color: Gray;">.</span><span style="color: Blue;">test</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">value</span><span style="color: Olive;">)){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;span class=&quot;formtips onok&quot;&gt;</span><span style="color: #8b0000;">'</span><span style="color: Gray;">+</span><span style="color: Blue;">Msg</span><span style="color: Olive;">[</span><span style="color: Maroon;">4</span><span style="color: Olive;">]</span><span style="color: Gray;">+</span><span style="color: #8b0000;">'</span><span style="color: Red;">&lt;/span&gt;</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">insertAfter</span><span style="color: Olive;">(</span><span style="color: Green;">this</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li></ol></div>
<p>验证url地址，因为这个不是必须的，所以只在有输入的情况下才去判断地址是否正确</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: #ffa500;">//提交，最终验证</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">#submit</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">click</span><span style="color: Olive;">(</span><span style="color: Green;">function</span><span style="color: Olive;">(){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">#commentform :input</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">trigger</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">blur</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: #ffa500;">//验证评论内容</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Gray;"> $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">textarea</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">val</span><span style="color: Olive;">()</span><span style="color: Gray;"> == </span><span style="color: #8b0000;">&quot;&quot;</span><span style="color: Gray;">|| $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">textarea</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">val</span><span style="color: Olive;">()</span><span style="color: Gray;">.</span><span style="color: Blue;">length</span><span style="color: Gray;"> &lt; </span><span style="color: Maroon;">5</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">tipsWindown</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">提示</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text:评论内容不能为空或少于5个字符!</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">250</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">150</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">2000</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">msg</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">false</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">var</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">numError</span><span style="color: Gray;"> = $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">form .onError</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">length</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">if</span><span style="color: Olive;">(</span><span style="color: Blue;">numError</span><span style="color: Olive;">){</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">tipsWindown</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">提示</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text:请正确填写表单内容</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">250</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">150</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">2000</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">msg</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Green;">return</span><span style="color: Gray;">&nbsp;</span><span style="color: Green;">false</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span><span style="color: Green;">else</span><span style="color: Olive;">{</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Blue;">tipsWindown</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">提示</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">text:正在提交评论...</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">250</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">150</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">2000</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">,</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">msg</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">.formtips</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">remove</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp; &nbsp; </span><span style="color: Olive;">})</span><span style="color: Gray;">;</span></li></ol></div>
<p>最后。绑定事件，然后验证评论内容是否为空或小于5个字符。如果为true则弹出提示层，并阻止表单的提交。否则弹出提示：正在提交评论&#8230;然后清除提示信息；OK，一个基于JQ的简单的表单验证完成了；</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="WordPress主题：perfct 1.0" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-perfct.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/09/22/33021700.jpg" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题：perfct 1.0</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="wordpress定制首页输出" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-customize-homepage.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">wordpress定制首页输出</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题之Maxthon 2.0.2[08-08-11]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpressthememaxthon202.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6198872.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题之Maxthon 2.0.2[08-08-11]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题”Dreamy”发布" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-theme-dreamy.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题”Dreamy”发布</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress主题高级技巧" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-themes-hacks.html&from=http%3A%2F%2Fleotheme.cn%2Fwordpress%2Fwordpress-comment-form-proof.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress主题高级技巧</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2008-09-15 -- <a href="http://leotheme.cn/javascript/jqueryforwpgoodtwo.html" title="jquery基础教程二[伸缩、隔行变色...]">jquery基础教程二[伸缩、隔行变色...]</a> (3)<br /><small>在上一篇介绍中已经讲了一些基本的应用，今天继续。先看一下面这个例子
Demo_5：收缩展开功能[如无法运行请多刷新几次或保存到本地运行]

 
 
 
 
可伸缩块 

 
p,d...</small></li><li>2011-09-08 -- <a href="http://leotheme.cn/javascript/jquery%e4%b8%adqueue%e5%92%8cdequeue%e7%9a%84%e7%94%a8%e6%b3%95.html" title="jQuery中queue和dequeue的用法">jQuery中queue和dequeue的用法</a> (1)<br /><small>今天在做右下角那个静止的工具栏时遇到了一个问题。鼠标放上去的时候，要让周围的4个按钮按顺序显示出来，移开的时候要按顺序隐藏。左思右想发现用animate的回调函数方式来写比较麻烦。于是百度了下，发现j...</small></li><li>2011-08-17 -- <a href="http://leotheme.cn/wordpress/flight-update.html" title="Flight主题更新">Flight主题更新</a> (16)<br /><small>这几天收到有些童鞋反应主题在wp3.2版本后台不能快速编缉文章，不能上传图片。抽空看了下，是JQ库版本冲突引起，现已更新。请移步到wopus主题站下载更新后的版本。也可以通过115网盘下载。...</small></li><li>2010-11-24 -- <a href="http://leotheme.cn/javascript/jquery-plugins-tipswindow-2-0.html" title="JQ弹出层插件(tipsWindow 2.8)">JQ弹出层插件(tipsWindow 2.8)</a> (154)<br /><small>已更新为2.7...</small></li><li>2010-10-12 -- <a href="http://leotheme.cn/javascript/flight-theme-jquery-ifocus.html" title="分享Flight主题中的焦点图（基于JQ）">分享Flight主题中的焦点图（基于JQ）</a> (22)<br /><small>关于这个焦点图没啥说的了，网上太多了。但自己一直没找到个合适的。现在的这个是Dreamy主题中的升级版，虽然看起来一模一样。其实做了很多扩展，优化了结构和JS部分。可以选择切换方式（左右滚动，上下滚动...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/wordpress/wordpress-comment-form-proof.html/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>jquery基础教程二[伸缩、隔行变色...]</title>
		<link>http://leotheme.cn/javascript/jqueryforwpgoodtwo.html</link>
		<comments>http://leotheme.cn/javascript/jqueryforwpgoodtwo.html#comments</comments>
		<pubDate>Tue, 16 Sep 2008 03:34:55 +0000</pubDate>
		<dc:creator>Await</dc:creator>
				<category><![CDATA[前端交互]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[WP相关]]></category>
		<category><![CDATA[评论]]></category>
		<category><![CDATA[隔行变色]]></category>

		<guid isPermaLink="false">http://leotheme.cn/?p=79</guid>
		<description><![CDATA[在上一篇介绍中已经讲了一些基本的应用，今天继续。先看一下面这个例子 Demo_5：收缩展开功能[如无法运行请多刷新几次或保存到本地运行] &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; &#60;head&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=gb2312&#34; /&#62; &#60;title&#62;可伸缩块&#60;/title&#62; &#60;style type=&#34;text/css&#34;&#62; p,div{margin:0;padding:0; font-size: 12px;} .box {float: left; margin-left: 20px; dipaly:inline;} .title1,.title2,.title3{width:280px;background:#cf0;height:20px;line-height: 20px;border:1px solid #aaa; text-align:center;} .content1,.content2,.content3{width:260px;height:350px;border:1px solid #aaa;border-top:none;padding: 10px;} &#60;/style&#62; &#60;script type='text/javascript' src=&#34;http://leotheme.cn/wp-includes/js/jquery/jquery.js&#34;&#62;&#60;/script&#62; &#60;script type=&#34;text/javascript&#34;&#62; $(document).ready(function(){ $(&#34;.title1&#34;).click(function(){$(&#34;.content1&#34;).slideDown(&#34;slow&#34;);}); $(&#34;.title2&#34;).click(function(){$(&#34;.content2&#34;).slideUp(&#34;slow&#34;);}); $(&#34;.title3&#34;).click(function(){$(&#34;.content3&#34;).slideToggle(&#34;slow&#34;);}); }); &#60;/script&#62; &#60;/head&#62; &#60;body&#62; &#60;div class=&#34;box&#34;&#62; [...]<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="jQuery中queue和dequeue的用法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery%25E4%25B8%25ADqueue%25E5%2592%258Cdequeue%25E7%259A%2584%25E7%2594%25A8%25E6%25B3%2595.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery中queue和dequeue的用法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="jQuery实现背景图渐变切换" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery-dragoninteractive-navi.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197230.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery实现背景图渐变切换</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用jQuery实现个性有序列表" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery-to-sequential-list.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197275.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用jQuery实现个性有序列表</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="jquery基础教程三[渐变效果]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Ffadeinfadeoutfadeto.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jquery基础教程三[渐变效果]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="jQuery 实现 tab 切换一例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery-tab.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197250.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery 实现 tab 切换一例</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>在<a href="http://leotheme.cn/javascript/jqueryforwpgoodone.html">上一篇</a>介绍中已经讲了一些基本的应用，今天继续。先看一下面这个例子<br />
Demo_5：收缩展开功能<span class="c_red">[如无法运行请多刷新几次或保存到本地运行]</span></p>
<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_k0w1tb">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;
&lt;title&gt;可伸缩块&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
p,div{margin:0;padding:0; font-size: 12px;}
.box {float: left; margin-left: 20px; dipaly:inline;}
.title1,.title2,.title3{width:280px;background:#cf0;height:20px;line-height: 20px;border:1px solid #aaa; text-align:center;}
.content1,.content2,.content3{width:260px;height:350px;border:1px solid #aaa;border-top:none;padding: 10px;}
&lt;/style&gt;
&lt;script type='text/javascript' src=&quot;http://leotheme.cn/wp-includes/js/jquery/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){
	$(&quot;.title1&quot;).click(function(){$(&quot;.content1&quot;).slideDown(&quot;slow&quot;);});
	$(&quot;.title2&quot;).click(function(){$(&quot;.content2&quot;).slideUp(&quot;slow&quot;);});
	$(&quot;.title3&quot;).click(function(){$(&quot;.content3&quot;).slideToggle(&quot;slow&quot;);});
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;box&quot;&gt;
&lt;p class=&quot;title1&quot;&gt;slideDown&lt;/p&gt;
&lt;div class=&quot;content1&quot;&gt;
通过高度变化（向下增大）来动态地显示所有匹配的元素，在显示完成后可选地触发一个回调函数。
这个动画效果只调整元素的高度，可以使匹配的元素以“滑动”的方式显示出来。
speed (String,Number) : 三种预定速度之一的字符串(&quot;slow&quot;, &quot;normal&quot;, or &quot;fast&quot;)或表示动画时长的毫秒数值(如：1000)
&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;box&quot;&gt;
&lt;p class=&quot;title2&quot;&gt;slideUp&lt;/p&gt;
&lt;div class=&quot;content2&quot;&gt;
通过高度变化（向上减小）来动态地隐藏所有匹配的元素，在隐藏完成后可选地触发一个回调函数。
这个动画效果只调整元素的高度，可以使匹配的元素以“滑动”的方式隐藏起来。
speed (String,Number) : 三种预定速度之一的字符串(&quot;slow&quot;, &quot;normal&quot;, or &quot;fast&quot;)或表示动画时长的毫秒数值(如：1000)
&lt;/div&gt; &lt;/div&gt;
&lt;div class=&quot;box&quot;&gt;
&lt;p class=&quot;title3&quot;&gt;slideToggle&lt;/p&gt;
&lt;div class=&quot;content3&quot;&gt;
通过高度变化来切换所有匹配元素的可见性，并在切换完成后可选地触发一个回调函数。
这个动画效果只调整元素的高度，可以使匹配的元素以“滑动”的方式隐藏或显示。
speed (String,Number) : 三种预定速度之一的字符串(&quot;slow&quot;, &quot;normal&quot;, or &quot;fast&quot;)或表示动画时长的毫秒数值(如：1000)
&lt;/div&gt; &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="U.Code.Run('runcode_k0w1tb');"/> <input type="button" value="复制" class="runcode_button" onclick="U.Code.Copy('runcode_k0w1tb');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p><span id="more-79"></span></p>
<p>通过这个例子，你就能做像我侧边栏的收缩效果了，而且很简单，一行代码就行了，怎么样？</p>
<p>下面我们再来看一个很实用的例子<br />
 Demo_7：隔行变色, 鼠标滑过变色，点击变色</p>
<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_EnhbQO">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;
&lt;title&gt;StripingTable&lt;/title&gt;
&lt;script type='text/javascript' src=&quot;http://leotheme.cn/wp-includes/js/jquery/jquery.js&quot;&gt;&lt;/script&gt;
&lt;!--将jQuery引用进来--&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){
     $(&quot;.stripe li:even&quot;).addClass(&quot;alt&quot;);
     //给class为stripe的列表的偶数行添加class值为alt
	 $(&quot;.stripe2 li&quot;).mouseover(function(){
     //如果鼠标移到class为stripe的列表的li上时，执行函数
     $(this).addClass(&quot;over&quot;);}).mouseout(function(){
     //给这行添加class值为over，并且当鼠标一出该行时执行函数
     $(this).removeClass(&quot;over&quot;);}); //移除该行的class
	 $(&quot;.stripe3 li&quot;).click(function(){
	 $(this).toggleClass(&quot;alt&quot;);});//点击变色,注意：因为有隔行变色，所以这里必须在触发toggleClass时,remove(&quot;alt&quot;).
});
&lt;/script&gt;
&lt;style&gt;
body {
		margin: 0 auto;
		text-align: center;
}
ul {
		width: 500px;
margin: 0 auto;
		text-align:left;
        list-style: none;
		border: 1px solid #c2c2c2;
		border-bottom:none;
		margin-top: 10px;
}
li {
        padding:6px;
		border-bottom: 1px solid #c2c2c2;
}
.alt {
        background:#ecf6fc;  /*这行将给所有的li加上背景色*/
}
.over {
        background:#bcd4ec;  /*这个将是鼠标高亮行的背景色*/
}
.click{background:yellow;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;ul class=&quot;stripe&quot;&gt;
&lt;li&gt;隔行变色&lt;/li&gt;
&lt;li&gt;Name ：Louis&lt;/li&gt;
&lt;li&gt;E-mail：yltfy2008@gmail.com&lt;/li&gt;
&lt;li&gt;Q    Q：214227707&lt;/li&gt;
&lt;li&gt;WWW：http://leotheme.cn/&lt;/li&gt;
&lt;li&gt;……&lt;/li&gt;
&lt;/ul&gt;
&lt;ul class=&quot;stripe2&quot;&gt;
&lt;li&gt;鼠标滑过变色&lt;/li&gt;
&lt;li&gt;Name ：Louis&lt;/li&gt;
&lt;li&gt;E-mail：yltfy2008@gmail.com&lt;/li&gt;
&lt;li&gt;Q    Q：214227707&lt;/li&gt;
&lt;li&gt;WWW：http://leotheme.cn/&lt;/li&gt;
&lt;li&gt;……&lt;/li&gt;
&lt;/ul&gt;
&lt;ul class=&quot;stripe3&quot;&gt;
&lt;li&gt;点击变色&lt;/li&gt;
&lt;li&gt;Name ：Louis&lt;/li&gt;
&lt;li&gt;E-mail：yltfy2008@gmail.com&lt;/li&gt;
&lt;li&gt;Q    Q：214227707&lt;/li&gt;
&lt;li&gt;WWW：http://leotheme.cn/&lt;/li&gt;
&lt;li&gt;……&lt;/li&gt;
&lt;/ul&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="U.Code.Run('runcode_EnhbQO');"/> <input type="button" value="复制" class="runcode_button" onclick="U.Code.Copy('runcode_EnhbQO');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p>通过这个例子，大家可以很方便得做出评论隔行变色的效果了。</p>
<p>好了，今天就讲这两个实用的例子了。大家可以去试试</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="3" border="0"  style="clear: both;">
    
    <tr>
        <td colspan="5"><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
        <tr>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="jQuery中queue和dequeue的用法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery%25E4%25B8%25ADqueue%25E5%2592%258Cdequeue%25E7%259A%2584%25E7%2594%25A8%25E6%25B3%2595.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery中queue和dequeue的用法</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="jQuery实现背景图渐变切换" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery-dragoninteractive-navi.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197230.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery实现背景图渐变切换</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="用jQuery实现个性有序列表" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery-to-sequential-list.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197275.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">用jQuery实现个性有序列表</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="jquery基础教程三[渐变效果]" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Ffadeinfadeoutfadeto.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jquery基础教程三[渐变效果]</font>
                    </a>
                </td>
                <td width="102" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="jQuery 实现 tab 切换一例" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjquery-tab.html&from=http%3A%2F%2Fleotheme.cn%2Fjavascript%2Fjqueryforwpgoodtwo.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;" src="http://static.wumii.com/site_images/2011/04/22/6197250.png" width="96px" height="96px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery 实现 tab 切换一例</font>
                    </a>
                </td>
        </tr>
    
    <tr>
        <td colspan="5" align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table><h3  class="related_post_title">相关文章</h3><ul class="related_post"><li>2008-09-11 -- <a href="http://leotheme.cn/javascript/jqueryforwpgoodone.html" title="jquery基础教程一[click,addClass,show,hide]">jquery基础教程一[click,addClass,show,hide]</a> (3)<br /><small>原创内容—转载请说明出处.

jQuery我想很多人都知道，但用WP的好像很少有人说到这个。今天开始和大家一起来研究下如何用jQuery来为我们的WP添加实用的功能。至于jQuery的相关背景和资...</small></li><li>2008-08-28 -- <a href="http://leotheme.cn/wordpress/wordpressjs-jqueryone.html" title="利用WP自带的JS库打造超酷的侧边栏">利用WP自带的JS库打造超酷的侧边栏</a> (6)<br /><small>从这篇文章开始，我们来认识下wordpress自带的JS库，下面这张图是WP自动的JS文件夹。可以看出有很多JS文件，当然包括大名鼎鼎的jquery和prototype。利用这些我们能实现很多很酷的效...</small></li><li>2009-11-30 -- <a href="http://leotheme.cn/javascript/ajax-load-post-content.html" title="不刷新（AJAX）获取文章的内容">不刷新（AJAX）获取文章的内容</a> (53)<br /><small>相信大家都知道AJAX评论这玩意。AJAX评论带来了很多好处，不用在刷新页面就能发表评论。实时提交，实时显示。很多人都用上了都给自己的BLOG上添加了这样的功能。方法在这就不说了，很多人都作了详细的讲...</small></li><li>2009-11-28 -- <a href="http://leotheme.cn/wordpress/wordpress-comment-form-proof.html" title="WordPress评论表单验证">WordPress评论表单验证</a> (20)<br /><small>wordpress的评论只是个很简单的表单。WP本身也有一个自身的验证系统。但自带的这个验证是基于后台的验证。当表单不符合规格时跳转到另一个页面。我们需要返回上一页才能继续填写表单。这样对于用户的体验...</small></li><li>2009-06-11 -- <a href="http://leotheme.cn/javascript/jquery-tab.html" title="jQuery 实现 tab 切换一例">jQuery 实现 tab 切换一例</a> (11)<br /><small>对于Tab切换，我想大家都不陌生了。现在几乎是到处可见了；今天为大家介绍下怎么用jQuery来实现一个简单的Tab切换效果。其实这类例子网上也有很多了，在这里不讨论它的实现原理，因为都是些最基本的应用...</small></li></ul>]]></content:encoded>
			<wfw:commentRss>http://leotheme.cn/javascript/jqueryforwpgoodtwo.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

