<?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://www.happyet.org/tag/%e5%8f%91%e8%a1%a8%e8%af%84%e8%ae%ba/feed" rel="self" type="application/rss+xml" />
	<link>http://www.happyet.org</link>
	<description>自娱自乐，不亦乐乎!</description>
	<lastBuildDate>Sun, 29 Jan 2012 10:01:05 +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>利用jQuery提高访客评论的用户体验</title>
		<link>http://www.happyet.org/247.html</link>
		<comments>http://www.happyet.org/247.html#comments</comments>
		<pubDate>Thu, 09 Jul 2009 05:56:30 +0000</pubDate>
		<dc:creator>LMS</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[体验]]></category>
		<category><![CDATA[发表评论]]></category>
		<category><![CDATA[技巧]]></category>

		<guid isPermaLink="false">http://www.happyet.org/archives/247</guid>
		<description><![CDATA[好吧，我承认，今天是第二次从immmmm那直接复制粘贴文章过来了，可是没办法，实在是太喜欢这个功能了，在好几个wp博客上发现过这个功能，正好想找的时候被我遇到了，而且我也已经加上了这个功能了，不管是出于以后修改方便，还是其他什么原因，反正我是决定要转过来了。 这篇文章说的是：访客留言之后资料输入框会被隐藏起来, 如同登录了一般. 访客可以选择修改相关资料再进行评论. 给予访客很好的用户体验。一个相当实用的提高访客评论用户体验功能。 在comments.php文件里你自己的输入评论昵称，邮件，网址的那段代码处用以下代码覆盖，然后适当修改css文件就OK了，效果你可以评论一下就知道了。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 &#60;!-- 有资料的访客 --&#62; &#60;?php if &#40; $comment_author != &#34;&#34; &#41; : ?&#62; &#60;script type=&#34;text/javascript&#34;&#62;function setStyleDisplay(id, status){document.getElementById(id).style.display = status;}&#60;/script&#62; &#60;div class=&#34;form_row small&#34;&#62; &#60;?php printf&#40;__&#40;'Welcome [...]<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="118" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Sweet Titles for jQuery (美妙的标题提示) !" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.happyet.org%2F373.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2010/12/28/1617342.png" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Sweet Titles for jQuery (美妙的标题提示) !</font>
                    </a>
                </td>
                <td width="118" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="给wordpress添加Ctrl+Enter快捷发表评论功能的两种方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.happyet.org%2F244.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/07/19/18082827.jpg" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">给wordpress添加Ctrl+Enter快捷发表评论功能的两种方法</font>
                    </a>
                </td>
                <td width="118" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="改善网站体验小细节，点击链接显示loading" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.happyet.org%2F374.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2010/12/17/1271318.gif" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">改善网站体验小细节，点击链接显示loading</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F603.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/04/20/5242170.png" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在wordpress列表页（首页）显示各文章评论</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F488.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2010/12/17/1271230.jpg" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery让背景图片滑动起来</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://immmmm.com" target="_blank">immmmm</a>那直接复制粘贴文章过来了，可是没办法，实在是太喜欢这个功能了，在好几个wp博客上发现过这个功能，正好想找的时候被我遇到了，而且我也已经加上了这个功能了，不管是出于以后修改方便，还是其他什么原因，反正我是决定要转过来了。</p>
<p>这篇文章说的是：访客留言之后资料输入框会被隐藏起来, 如同登录了一般. 访客可以选择修改相关资料再进行评论. 给予访客很好的用户体验。一个相当实用的提高访客评论用户体验功能。</p>
<p>在comments.php文件里你自己的输入评论昵称，邮件，网址的那段代码处用以下代码覆盖，然后适当修改css文件就OK了，效果你可以评论一下就知道了。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;!-- 有资料的访客 --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment_author</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;script type=&quot;text/javascript&quot;&gt;function setStyleDisplay(id, status){document.getElementById(id).style.display = status;}&lt;/script&gt;
    &lt;div class=&quot;form_row small&quot;&gt;
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">printf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Welcome back &lt;strong&gt;%s&lt;/strong&gt;.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$comment_author</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;span id=&quot;show_author_info&quot;&gt;&lt;a href=&quot;javascript:setStyleDisplay('author_info','');setStyleDisplay('show_author_info','none');setStyleDisplay('hide_author_info','');&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Change &amp;raquo;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/span&gt;
        &lt;span id=&quot;hide_author_info&quot;&gt;&lt;a href=&quot;javascript:setStyleDisplay('author_info','none');setStyleDisplay('show_author_info','');setStyleDisplay('hide_author_info','none');&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Close &amp;raquo;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/span&gt;
    &lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&lt;!-- 资料输入框 --&gt;
&lt;div id=&quot;author_info&quot;&gt;
    &lt;input type=&quot;text&quot; name=&quot;author&quot; id=&quot;author&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$comment_author</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; tabindex=&quot;1&quot; /&gt;
    &lt;label for=&quot;author&quot; class=&quot;small&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'(required)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/label&gt;
&nbsp;
    &lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$comment_author_email</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; tabindex=&quot;2&quot; /&gt;
    &lt;label for=&quot;email&quot; class=&quot;small&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'E-Mail (will not be published)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$req</span><span style="color: #009900;">&#41;</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'(required)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/label&gt;
&nbsp;
    &lt;input type=&quot;text&quot; name=&quot;url&quot; id=&quot;url&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$comment_author_url</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; tabindex=&quot;3&quot; /&gt;
    &lt;label for=&quot;url&quot; class=&quot;small&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Website'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/label&gt;
&lt;/div&gt;
&nbsp;
&lt;!-- 有资料的访客 --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment_author</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;script type=&quot;text/javascript&quot;&gt;setStyleDisplay('hide_author_info','none');setStyleDisplay('author_info','none');&lt;/script&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>原文地址：http://immmmm.com/using-jquery-to-improve-experience.html</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="118" valign="top" style="padding: 5px !important; margin: 0 !important;">
                    <a target="_blank" title="Sweet Titles for jQuery (美妙的标题提示) !" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.happyet.org%2F373.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2010/12/28/1617342.png" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">Sweet Titles for jQuery (美妙的标题提示) !</font>
                    </a>
                </td>
                <td width="118" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="给wordpress添加Ctrl+Enter快捷发表评论功能的两种方法" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.happyet.org%2F244.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/07/19/18082827.jpg" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">给wordpress添加Ctrl+Enter快捷发表评论功能的两种方法</font>
                    </a>
                </td>
                <td width="118" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="改善网站体验小细节，点击链接显示loading" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.happyet.org%2F374.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2010/12/17/1271318.gif" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">改善网站体验小细节，点击链接显示loading</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F603.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/04/20/5242170.png" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在wordpress列表页（首页）显示各文章评论</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F488.html&from=http%3A%2F%2Fwww.happyet.org%2F247.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2010/12/17/1271230.jpg" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">jQuery让背景图片滑动起来</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>]]></content:encoded>
			<wfw:commentRss>http://www.happyet.org/247.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>给wordpress添加Ctrl+Enter快捷发表评论功能的两种方法</title>
		<link>http://www.happyet.org/244.html</link>
		<comments>http://www.happyet.org/244.html#comments</comments>
		<pubDate>Tue, 07 Jul 2009 05:09:50 +0000</pubDate>
		<dc:creator>LMS</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Ctrl+Enter]]></category>
		<category><![CDATA[发表评论]]></category>

		<guid isPermaLink="false">http://www.happyet.org/archives/244</guid>
		<description><![CDATA[经常逛论坛的人一般都习惯评论完后直接按ctrl+enter提交评论，使用QQ聊天时也是这样，打完字随手按下快捷键搞定，其实通过加入js代码，在wordpress评论时也可以实现这个功能。（注意代码中的全角都要改为半角） 方法一、在wordpress的comments.php里&#60;/form&#62;&#60;/div&#62;&#60;?php endif; ?&#62;后插入如下js代码也可以实现这个功能： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 &#60;script type=&#34;text/javascript&#34;&#62; document.getElementById&#40;&#34;comment&#34;&#41;.onkeydown = function &#40;moz_ev&#41; &#123; var ev = null; if &#40;window.event&#41;&#123; ev = window.event; &#125;else&#123; ev = moz_ev; &#125; if &#40;ev != null &#38;&#38; ev.ctrlKey &#38;&#38; ev.keyCode == 13&#41; &#123; document.getElementById&#40;&#34;submit&#34;&#41;.click&#40;&#41;; &#125; &#125; &#60;/script&#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="118" valign="top" style="padding: 5px !important; margin: 0 !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%2Fwww.happyet.org%2F247.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2010/12/17/1271481.gif" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">利用jQuery提高访客评论的用户体验</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F603.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/04/20/5242170.png" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在wordpress列表页（首页）显示各文章评论</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F317.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">给WordPress评论添加计算验证功能</font>
                    </a>
                </td>
                <td width="118" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress的object-cache缓存" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.happyet.org%2F561.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/02/11/2646694.jpg" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress的object-cache缓存</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F272.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/08/14/22741967.jpg" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !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>经常逛论坛的人一般都习惯评论完后直接按ctrl+enter提交评论，使用QQ聊天时也是这样，打完字随手按下快捷键搞定，其实通过加入js代码，在wordpress评论时也可以实现这个功能。（注意代码中的全角都要改为半角）</p>
<p><strong>方法一、</strong>在wordpress的comments.php里&lt;/form&gt;&lt;/div&gt;&lt;?php endif; ?&gt;后插入如下js代码也可以实现这个功能：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;comment&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">onkeydown</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>moz_ev<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> ev <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">event</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
ev <span style="color: #339933;">=</span> window.<span style="color: #660066;">event</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #009900;">&#123;</span>
ev <span style="color: #339933;">=</span> moz_ev<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ev <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> ev.<span style="color: #660066;">ctrlKey</span> <span style="color: #339933;">&amp;&amp;</span> ev.<span style="color: #660066;">keyCode</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">13</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;submit&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>然后继续在comments.php文件中找到下面这句：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;&lt;</span>input name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submit&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;submitbutton&quot;</span> tabindex<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;5&quot;</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Leave comment&quot;</span> <span style="color: #339933;">/&gt;</span></pre></div></div>

<p>将value=”Leave comment”（不同的主题可能会有些差别，其实就是提交的那个按扭）的value值里加上一个(Ctrl+Enter)，改成value=”Leave comment (Ctrl+Enter)”</p>
<p>本文章转自：http://www.yueye.org/2009/use-ctrl-enter-to-submit-comments-for-wordpress.html</p>
<p><strong>方法二、</strong>此法更为简洁，强烈推荐使用</p>
<p>在 comments.php 中找到以下代码：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>textarea name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;comment&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;comment&quot;</span> cols<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;105&quot;</span> rows<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;10&quot;</span>tabindex<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;4&quot;</span><span style="color: #339933;">&gt;&lt;/</span>textarea<span style="color: #339933;">&gt;</span></pre></div></div>

<p>修改为：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>textarea name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;comment&quot;</span> id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;comment&quot;</span> cols<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;105&quot;</span> rows<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;10&quot;</span>tabindex<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;4&quot;</span>
onkeydown<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;if(event.ctrlKey&amp;&amp;event.keyCode==13)
{document.getElementById('submit').click();return false};&quot;</span><span style="color: #339933;">&gt;&lt;/</span>textarea<span style="color: #339933;">&gt;</span></pre></div></div>

<p>此方法为<a href="http://immmmm.com" target="_blank">木木</a>同学发明，发布在<a href="http://www.life-studio.cn/use-ctrl-enter-to-submit-comments-for-wordpress.html" target="_blank">万戈</a>那的。</p>
<p style="margin:0;padding:0;height:1px;overflow:hidden;">
    <script type="text/javascript"><!--
        var wumiiSitePrefix = "http://www.happyet.org";
        var wumiiEnableCustomPos = false;
        var wumiiParams = "&#038;num=5&#038;mode=3&#038;displayInFeed=1&#038;version=1.0.5.5&#038;pf=WordPress3.3.1";
    //--></script><script type="text/javascript" src="http://widget.wumii.com/ext/relatedItemsWidget.htm"></script><a href="http://www.wumii.com/widget/relatedItems.htm" style="border:0;"><img src="http://static.wumii.com/images/pixel.png" alt="无觅相关文章插件，快速提升流量" style="border:0;padding:0;margin:0;" /></a></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="118" valign="top" style="padding: 5px !important; margin: 0 !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%2Fwww.happyet.org%2F247.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2010/12/17/1271481.gif" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">利用jQuery提高访客评论的用户体验</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F603.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/04/20/5242170.png" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">在wordpress列表页（首页）显示各文章评论</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F317.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/images/blogWidget/wordpress_default.gif" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">给WordPress评论添加计算验证功能</font>
                    </a>
                </td>
                <td width="118" valign="top" style="padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;">
                    <a target="_blank" title="WordPress的object-cache缓存" style="text-decoration: none !important; cursor: pointer !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.happyet.org%2F561.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/02/11/2646694.jpg" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;">WordPress的object-cache缓存</font>
                    </a>
                </td>
                <td width="118" 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%2Fwww.happyet.org%2F272.html&from=http%3A%2F%2Fwww.happyet.org%2F244.html">
                        <img style="margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 112px !important; height: 112px !important;" src="http://static.wumii.com/site_images/2011/08/14/22741967.jpg" width="112px" height="112px" /><br />
                        <font size="-1" color="#333333" style="display: block !important; line-height: 15px !important; width: 118px !important; font: 12px/15px arial !important; height: 30px !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>]]></content:encoded>
			<wfw:commentRss>http://www.happyet.org/244.html/feed</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
	</channel>
</rss>

