<?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>I'm qiqiboy !</title>
	<atom:link href="http://www.qiqiboy.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.qiqiboy.com</link>
	<description>Yes,I'm qiqiboy ! And my vision is world peace.</description>
	<lastBuildDate>Mon, 06 Sep 2010 16:17:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=9.9.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>读者墙效果【二】- 头像自由拖拽</title>
		<link>http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html</link>
		<comments>http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comments</comments>
		<pubDate>Mon, 06 Sep 2010 15:33:27 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[特效]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html</guid>
		<description><![CDATA[<p>上一篇博文《<strong><font color="#ff0000">我的读者墙展示（附所用JS代码）</font></strong>》中我分享了自己所用的读者墙JavaScript部分代码。其实关于读者墙我还写了一个版本的js效果，不过离我最终的效果还有差距（最终要实现自由拖放，头像碰撞的效果，并能再排序），暂时只是实现了头像的自由拖动摆放。不过还好了，所以也拿出来分享一下。</p>
<p><img style="display: inline" title="拖拽" alt="拖拽" src="http://www.qiqiboy.com/wp-content/uploads/2010/09/thumb.png" width="614" height="301" /></p>]]></description>
			<content:encoded><![CDATA[<p>上一篇博文《<strong><font color="#ff0000">我的读者墙展示（附所用JS代码）</font></strong>》中我分享了自己所用的读者墙JavaScript部分代码。其实关于读者墙我还写了一个版本的js效果，不过离我最终的效果还有差距（最终要实现自由拖放，头像碰撞的效果，并能再排序），暂时只是实现了头像的自由拖动摆放。不过还好了，所以也拿出来分享一下。</p>
<p>代码如下（代码以本文所贴为主，所提供demo包中代码可能不会更新，代码中发现错误或bug的修复都会以本文中为主）：</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 500px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #0000ff">var</span> DragUnit=Class.create();<span style="color: #008000">//基类的构造，具体参见上篇文章中的开头代码</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span> DragUnit.z=1;<span style="color: #008000">//z-index的值</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span> DragUnit.prototype={</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span>     init:<span style="color: #0000ff">function</span>(node){<span style="color: #008000">//初始化构造</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>         <span style="color: #0000ff">this</span>.node=<span style="color: #0000ff">typeof</span> node == <span style="color: #006080">'string'</span>? <span style="color: #0000ff">this</span>.$(node):node;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span>         <span style="color: #0000ff">this</span>.node.style.position = <span style="color: #006080">&quot;relative&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span>         <span style="color: #0000ff">this</span>.node.onmousedown=<span style="color: #0000ff">this</span>.bind(<span style="color: #0000ff">this</span>.start,<span style="color: #0000ff">this</span>);<span style="color: #008000">//绑定鼠标按下事件</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span>         <span style="color: #0000ff">this</span>.node.onmouseup=<span style="color: #0000ff">this</span>.bind(<span style="color: #0000ff">this</span>.end,<span style="color: #0000ff">this</span>);<span style="color: #008000">//鼠标松开</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>         <span style="color: #0000ff">this</span>.draging = <span style="color: #0000ff">false</span>;<span style="color: #008000">//拖动的状态</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum12">  12:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum13">  13:</span>     start:<span style="color: #0000ff">function</span>(e){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum14">  14:</span>         <span style="color: #0000ff">this</span>.node.style.cursor = <span style="color: #006080">&quot;move&quot;</span>;<span style="color: #008000">//更改被拖动节点的鼠标样式</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum15">  15:</span>         document.onmousemove=<span style="color: #0000ff">this</span>.bind(<span style="color: #0000ff">this</span>.move,<span style="color: #0000ff">this</span>);<span style="color: #008000">//绑定鼠标移动事件</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum16">  16:</span>         <span style="color: #0000ff">this</span>.stopPrevent(e);<span style="color: #008000">//阻止浏览器的默认行为</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum17">  17:</span>         <span style="color: #0000ff">this</span>.node.style.zIndex = DragUnit.z++;<span style="color: #008000">//设置z-index值</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum18">  18:</span>         <span style="color: #0000ff">this</span>.draging = <span style="color: #0000ff">true</span>;<span style="color: #008000">//标记拖动状态</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum19">  19:</span>         <span style="color: #0000ff">this</span>.mouseXY = <span style="color: #0000ff">this</span>.getMousePoint(e);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum20">  20:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum21">  21:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum22">  22:</span>     move:<span style="color: #0000ff">function</span>(e){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum23">  23:</span>         <span style="color: #0000ff">this</span>.stopPrevent(e);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum24">  24:</span>         <span style="color: #0000ff">if</span>(<span style="color: #0000ff">this</span>.draging){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum25">  25:</span>             <span style="color: #0000ff">var</span> mouseXY = <span style="color: #0000ff">this</span>.getMousePoint(e);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum26">  26:</span>             <span style="color: #008000">//设置left、top的值</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum27">  27:</span>             <span style="color: #0000ff">this</span>.node.style.left = (parseInt(<span style="color: #0000ff">this</span>.getStyle(<span style="color: #0000ff">this</span>.node,<span style="color: #006080">'left'</span>))||0) + mouseXY.x - <span style="color: #0000ff">this</span>.mouseXY.x + <span style="color: #006080">&quot;px&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum28">  28:</span>             <span style="color: #0000ff">this</span>.node.style.top =  (parseInt(<span style="color: #0000ff">this</span>.getStyle(<span style="color: #0000ff">this</span>.node,<span style="color: #006080">'top'</span>))||0) + mouseXY.y - <span style="color: #0000ff">this</span>.mouseXY.y + <span style="color: #006080">&quot;px&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum29">  29:</span>             <span style="color: #0000ff">this</span>.mouseXY = <span style="color: #0000ff">this</span>.getMousePoint(e);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum30">  30:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum31">  31:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum32">  32:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum33">  33:</span>     end:<span style="color: #0000ff">function</span>(e){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum34">  34:</span>         document.onmousemove=<span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum35">  35:</span>         <span style="color: #0000ff">this</span>.node.style.cursor = <span style="color: #006080">&quot;auto&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum36">  36:</span>         <span style="color: #0000ff">this</span>.stopPrevent(e);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum37">  37:</span>         <span style="color: #0000ff">this</span>.draging = <span style="color: #0000ff">false</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum38">  38:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum39">  39:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum40">  40:</span>     $:<span style="color: #0000ff">function</span>(id){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum41">  41:</span>         <span style="color: #0000ff">return</span> document.getElementById(id);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum42">  42:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum43">  43:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum44">  44:</span>     $$:<span style="color: #0000ff">function</span>(c, t, p){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum45">  45:</span>         <span style="color: #0000ff">var</span> at = p.getElementsByTagName(t);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum46">  46:</span>         <span style="color: #0000ff">var</span> ms = <span style="color: #0000ff">new</span> Array();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum47">  47:</span>         <span style="color: #0000ff">var</span> r = <span style="color: #0000ff">new</span> RegExp(<span style="color: #006080">'(^|\\s)'</span> + c.replace(/\-/g, <span style="color: #006080">'\\-'</span>) + <span style="color: #006080">'(\\s|$)'</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum48">  48:</span>         <span style="color: #0000ff">var</span> e;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum49">  49:</span>         <span style="color: #0000ff">for</span> (<span style="color: #0000ff">var</span> i = 0; i &lt; at.length; i++) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum50">  50:</span>             e = at[i];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum51">  51:</span>             <span style="color: #0000ff">if</span> (r.test(e.className)) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum52">  52:</span>                 ms.push(e)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum53">  53:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum54">  54:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum55">  55:</span>         <span style="color: #0000ff">return</span> ms</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum56">  56:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum57">  57:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum58">  58:</span>     stopPrevent: <span style="color: #0000ff">function</span>(e) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum59">  59:</span>         <span style="color: #0000ff">if</span> (window.<span style="color: #0000ff">event</span>) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum60">  60:</span>             window.<span style="color: #0000ff">event</span>.cancelBubble = <span style="color: #0000ff">true</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum61">  61:</span>             window.<span style="color: #0000ff">event</span>.returnValue = <span style="color: #0000ff">false</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum62">  62:</span>             <span style="color: #0000ff">return</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum63">  63:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum64">  64:</span>         <span style="color: #0000ff">if</span> (e.preventDefault &amp;&amp; e.stopPropagation) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum65">  65:</span>             e.preventDefault();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum66">  66:</span>             e.stopPropagation()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum67">  67:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum68">  68:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum69">  69:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum70">  70:</span>     getStyle:<span style="color: #0000ff">function</span>(element,property) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum71">  71:</span>         <span style="color: #0000ff">var</span> value = element.style[property];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum72">  72:</span>         <span style="color: #0000ff">if</span> (!value) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum73">  73:</span>             <span style="color: #0000ff">if</span> (document.defaultView &amp;&amp; document.defaultView.getComputedStyle) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum74">  74:</span>                 <span style="color: #0000ff">var</span> css = document.defaultView.getComputedStyle(element, <span style="color: #0000ff">null</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum75">  75:</span>                 value = css ? css.getPropertyValue(property) : <span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum76">  76:</span>             } <span style="color: #0000ff">else</span> <span style="color: #0000ff">if</span> (element.currentStyle) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum77">  77:</span>                 value = element.currentStyle[property];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum78">  78:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum79">  79:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum80">  80:</span>         <span style="color: #0000ff">return</span> value == <span style="color: #006080">'auto'</span> ? <span style="color: #006080">''</span> : value;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum81">  81:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum82">  82:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum83">  83:</span>     getMousePoint:<span style="color: #0000ff">function</span>(ev){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum84">  84:</span>         <span style="color: #0000ff">var</span> x=y=0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum85">  85:</span>         <span style="color: #0000ff">if</span> (<span style="color: #0000ff">typeof</span> window.pageYoffset!= <span style="color: #006080">'undefined'</span>) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum86">  86:</span>             x = window.pageXOffset;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum87">  87:</span>             y = window.pageYOffset</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum88">  88:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum89">  89:</span>         <span style="color: #0000ff">else</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum90">  90:</span>             <span style="color: #0000ff">if</span> (<span style="color: #0000ff">typeof</span> document.compatMode != <span style="color: #006080">'undefined'</span> &amp;&amp; document.compatMode != <span style="color: #006080">'BackCompat'</span>) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum91">  91:</span>                 x = document.documentElement.scrollLeft;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum92">  92:</span>                 y = document.documentElement.scrollTop</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum93">  93:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum94">  94:</span>             <span style="color: #0000ff">else</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum95">  95:</span>                 <span style="color: #0000ff">if</span> (<span style="color: #0000ff">typeof</span> document.body != <span style="color: #006080">'undefined'</span>) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum96">  96:</span>                     x = document.body.scrollLeft;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum97">  97:</span>                     y = document.body.scrollTop</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum98">  98:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum99">  99:</span>         <span style="color: #0000ff">if</span>(!ev) ev=window.<span style="color: #0000ff">event</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum100"> 100:</span>         x += ev.clientX;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum101"> 101:</span>         y += ev.clientY;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum102"> 102:</span>         <span style="color: #0000ff">return</span> {<span style="color: #006080">'x'</span> <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> ,<span style="color: #006080">'y'</span>:y};</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum103"> 103:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum104"> 104:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum105"> 105:</span>     windowXY:<span style="color: #0000ff">function</span>(){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum106"> 106:</span>         <span style="color: #0000ff">return</span> {<span style="color: #006080">'x'</span>:window.innerWidth || document.documentElement.clientWidth,<span style="color: #006080">'y'</span>:window.innerHeight || document.documentElement.clientHeight};</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum107"> 107:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum108"> 108:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum109"> 109:</span>     bind:<span style="color: #0000ff">function</span>(f,o){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum110"> 110:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">function</span>(){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum111"> 111:</span>             <span style="color: #0000ff">return</span> f.apply(o,arguments);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum112"> 112:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum113"> 113:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum114"> 114:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p><div class="inpostad"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/feedad.gif" /><a href="http://www.qiqiboy.com/bluepaled" title="点击下载bluePaled" target="_blank"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/adtest.png" alt="点击下载bluePaled" /></a></div></p>
<p>使用以上代码，只需使用new运算符构造DragUnit类的实例化对象即可。比如有一个id=’dragme’的节点，只需要调用 </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #0000ff">new</span> DragUnit(<span style="color: #006080">'dragme'</span>);</pre>
<p><!--CRLF--></div>
</div>
<p>即可为此节点加上拖动效果，使其变得可被拖动。</p>
<p>DEMO可以点击此处查看：<strong><a href="http://u.boy.im/test-drag" target="_blank"><font color="#ff0000">DragUnit DEMO</font></a></strong></p>
<p>你可以拖动demo里的任意头像。效果兼容所有主流浏览器，从IE6到chrome。</p>
<p><img style="display: inline" title="拖拽" alt="拖拽" src="http://www.qiqiboy.com/wp-content/uploads/2010/09/a3739187b4ff.png" width="614" height="301" /></p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/code' rel='tag'>code</a>, <a href='http://www.qiqiboy.com/tags/html' rel='tag'>html</a>, <a href='http://www.qiqiboy.com/tags/javascript' rel='tag'>javascript</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a>, <a href='http://www.qiqiboy.com/tags/%e4%bb%a3%e7%a0%81' rel='tag'>代码</a>, <a href='http://www.qiqiboy.com/tags/%e7%89%b9%e6%95%88' rel='tag'>特效</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html" title="我的读者墙展示（附所用JS代码）">我的读者墙展示（附所用JS代码）</a> (47)<br /><small>好多人都在博客上弄了个读者墙，我之前也搞过，但是换了新主题之后就没再添加了。所以抽了个时间，在links页面加了读者墙，展示的是最近三个月内的评论数量在前72名的访客头像...</small></li><li><a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html" title="仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）">仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）</a> (97)<br /><small>效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓...</small></li><li><a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html" title="【效果测试展示篇】Ajax版即时侧边栏评论回复功能">【效果测试展示篇】Ajax版即时侧边栏评论回复功能</a> (68)<br /><small>自写了《博客加入若干Ajax效果》以来，在博客上陆续添加启用了一些ajax效果，一方面丰富博客体验，一方面也当做练习学习js的一种实践吧。昨天的时候，将wilin版的侧边栏最新评论...</small></li><li><a href="http://www.qiqiboy.com/2010/07/30/allows-you-to-paste-the-code-in-the-comments-box-free.html" title="让你的评论框自由粘贴代码">让你的评论框自由粘贴代码</a> (58)<br /><small>我前后试用了三种方法。

第一，我想写一个超级正则表达式，来直接将评论框中&lt;code&gt;&lt;/code&gt;包围的字符串中的“&lt;”转换为“&amp;lt;”。对于只有一对&lt;code&gt;&lt;/code&gt;标签...</small></li><li><a href="http://www.qiqiboy.com/2010/07/26/to-comment-box-to-add-text-formatting-editor.html" title="为评论框添加文字格式化编辑器">为评论框添加文字格式化编辑器</a> (80)<br /><small>我的代码遵寻以下几点效果：


  
    对于普通的加粗（&lt;strong&gt;）、倾斜（&lt;em&gt;）等，如果鼠标没有选择文字，则直接在光标位置处加上完整闭合的标签。然后光标定位到标签中...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/85">http://qiqi.boy.im/85<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comment-5301">liuqiqi</a>say: <a href="#comment-5300" rel="nofollow">@zwwooooo </a> 
。。。我承认u.boy.im有些露点。。。。。。哪天被天朝封了我也不会意外。。 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </li><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comment-5300">zwwooooo</a>say: <a href="#comment-5299" rel="nofollow">@zwwooooo </a> 
好像不是，可能是今天的dns有点不正常，偶尔会很慢</li><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comment-5299">zwwooooo</a>say: 越来越炫了，不过你那个u.boy.im给\强了？？？</li><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comment-5297">QiQiBoY</a>say: <a href="#comment-5295" rel="nofollow">@最有效的减肥产品 </a> 
哇。。木鱼。。。 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_surprised.gif' alt=':eek:' class='wp-smiley' /> </li><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comment-5296">QiQiBoY</a>say: <a href="#comment-5292" rel="nofollow">@Max Lee </a> 
额。。。  <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </li><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comment-5295">最有效的减肥产品</a>say: 文章写得不错！！
顺道来问个好、占个位，沙发沙发，希望允许！常来常往！！</li><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comment-5292">Max Lee</a>say: 效果太牛了！！！</li><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html#comment-5290">QiQiBoY</a>say: <a href="#comment-5289" rel="nofollow">@QiQiBoY </a> 
我囧。。还被转。。。！！！
<code>return {'x' : x , 'y':y};</code></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>我的读者墙展示（附所用JS代码）</title>
		<link>http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html</link>
		<comments>http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comments</comments>
		<pubDate>Fri, 03 Sep 2010 06:07:08 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[代码]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html</guid>
		<description><![CDATA[<p>好多人都在博客上弄了个读者墙，我之前也搞过，但是换了新主题之后就没再添加了。所以抽了个时间，在<a href="http://www.qiqiboy.com/links" target="_blank"><strong>links</strong></a>页面加了读者墙，展示的是最近三个月内的评论数量在前72名的访客头像。围观我的读者墙请<strong><a href="http://www.qiqiboy.com/links#commentsWall" target="_blank"><font color="#ff0000">移步此处</font></a>。</strong></p>

<p>读者墙部分加了个JS效果，鼠标移上去会在旁边打开一个侧滑面板，显示访客的姓名和评论数量等信息。我将这个效果封装了一下，与大家分享。 </p><p><img style="display: inline" title="11233" alt="11233" src="http://www.qiqiboy.com/wp-content/uploads/2010/09/11233.png" width="618" height="220" /></p>]]></description>
			<content:encoded><![CDATA[<p>好多人都在博客上弄了个读者墙，我之前也搞过，但是换了新主题之后就没再添加了。所以抽了个时间，在<a href="http://www.qiqiboy.com/links" target="_blank"><strong>links</strong></a>页面加了读者墙，展示的是最近三个月内的评论数量在前72名的访客头像。围观我的读者墙请<strong><a href="http://www.qiqiboy.com/links#commentsWall" target="_blank"><font color="#ff0000">移步此处</font></a>。</strong></p>
<p>读者墙部分加了个JS效果，鼠标移上去会在旁边打开一个侧滑面板，显示访客的姓名和评论数量等信息。我将这个效果封装了一下，与大家分享。 </p>
<p>(<strong><font color="#ff0000">注</font></strong>：因为涉及到代码的bug修复、代码更新等因素，demo中的代码不会同步更新，所以JS代码以本文中所贴为准。bug修复一: 修正浏览器宽度获取少计算滚动条宽度的问题。)</p>
<div style="height:500px;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #008000">/*!</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span> <span style="color: #008000"> * author: liuqiqi</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span> <span style="color: #008000"> * date: 2010/09/01</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span> <span style="color: #008000"> */</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span> <span style="color: #0000ff">var</span> Class = {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>     create: <span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span>             <span style="color: #0000ff">this</span>.init.apply(<span style="color: #0000ff">this</span>, arguments);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum12">  12:</span> <span style="color: #0000ff">var</span> PicWall=Class.create();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum13">  13:</span> PicWall.prototype={</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum14">  14:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum15">  15:</span>     init:<span style="color: #0000ff">function</span>(wrapId,infoId,picClass,textClass){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum16">  16:</span>         <span style="color: #0000ff">this</span>.wrap=<span style="color: #0000ff">this</span>.$(wrapId);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum17">  17:</span>         <span style="color: #0000ff">this</span>.info=<span style="color: #0000ff">this</span>.$(infoId);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum18">  18:</span>         <span style="color: #0000ff">this</span>.picClass=picClass;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum19">  19:</span>         <span style="color: #0000ff">this</span>.textClass=textClass;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum20">  20:</span>         <span style="color: #0000ff">this</span>.timer=<span style="color: #006080">&quot;&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum21">  21:</span>         <span style="color: #0000ff">this</span>.pics=<span style="color: #0000ff">this</span>.$$(<span style="color: #0000ff">this</span>.picClass, <span style="color: #006080">'li'</span>, <span style="color: #0000ff">this</span>.wrap)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum22">  22:</span>         <span style="color: #0000ff">for</span> (<span style="color: #0000ff">var</span> i = 0; i &lt; <span style="color: #0000ff">this</span>.pics.length; i++) {<span style="color: #008000">//给每张图片加上事件监听</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum23">  23:</span>             <span style="color: #0000ff">this</span>.addListener(<span style="color: #0000ff">this</span>.pics[i], <span style="color: #006080">'mouseover'</span>, <span style="color: #0000ff">this</span>.bind(<span style="color: #0000ff">this</span>.show,<span style="color: #0000ff">this</span>), <span style="color: #0000ff">false</span>);<span style="color: #008000">//用bind给事件函数绑定正确的对象</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum24">  24:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum25">  25:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum26">  26:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum27">  27:</span>     show:<span style="color: #0000ff">function</span>(e){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum28">  28:</span>         <span style="color: #008000">//这里要注意，页面结构li标签下必须是头像图片img，并且不要在img外再加a标签，否则下面这句代码获取不到正确的事件源节点</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum29">  29:</span>         <span style="color: #0000ff">var</span> node=e.target?e.target.parentNode:e.srcElement.parentNode;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum30">  30:</span>         <span style="color: #0000ff">this</span>.info.style.display = <span style="color: #006080">&quot;block&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum31">  31:</span>         <span style="color: #0000ff">this</span>.info.innerHTML = node.innerHTML;<span style="color: #008000">//将图片加到div#info中</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum32">  32:</span>         <span style="color: #0000ff">var</span> point = <span style="color: #0000ff">this</span>.getMousePoint(e);<span style="color: #008000">//获取事件发生时鼠标坐标</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum33">  33:</span>         <span style="color: #0000ff">var</span> picXY = <span style="color: #0000ff">this</span>.getPicXY(node);<span style="color: #008000">//获取当前图片的坐标</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum34">  34:</span>         <span style="color: #0000ff">var</span> windowx = document.documentElement.clientWidth || document.body.clientWidth;<span style="color: #008000">//浏览器可视区域宽高(前者为网页头声明W3C标准后正常获取可视区域宽度，后者为未声明标准情况下IE获取宽度)</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum35">  35:</span>         <span style="color: #0000ff">var</span> maxleft = <span style="color: #0000ff">this</span>.getPicXY(<span style="color: #0000ff">this</span>.wrap).x + <span style="color: #0000ff">this</span>.wrap.clientWidth;<span style="color: #008000">//alert(maxleft);return; 放置图片列表容器的右边框x坐标</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum36">  36:</span>         <span style="color: #0000ff">if</span> (picXY.x + 156 &gt; maxleft) {<span style="color: #008000">//信息框展开后大于容器右边框，则使信息框向左滑动展开</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum37">  37:</span>             <span style="color: #0000ff">this</span>.info.style.left = <span style="color: #006080">&quot;auto&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum38">  38:</span>             <span style="color: #0000ff">this</span>.info.style.right = windowx - picXY.x - 53 + <span style="color: #006080">&quot;px&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum39">  39:</span>             <span style="color: #0000ff">this</span>.addClassName(<span style="color: #0000ff">this</span>.info, <span style="color: #006080">'right'</span>);<span style="color: #008000">//此处是将头像浮动到右边显示</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum40">  40:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum41">  41:</span>         <span style="color: #0000ff">else</span> {<span style="color: #008000">//正常情况下信息框在右边滑动展开</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum42">  42:</span>             <span style="color: #0000ff">this</span>.removeClassName(<span style="color: #0000ff">this</span>.info, <span style="color: #006080">'right'</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum43">  43:</span>             <span style="color: #0000ff">this</span>.info.style.right = <span style="color: #006080">&quot;auto&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum44">  44:</span>             <span style="color: #0000ff">this</span>.info.style.left = picXY.x - 3 + <span style="color: #006080">&quot;px&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum45">  45:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum46">  46:</span>         <span style="color: #0000ff">this</span>.info.style.top = picXY.y - 3 + <span style="color: #006080">&quot;px&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum47">  47:</span>         <span style="color: #0000ff">this</span>.addListener(<span style="color: #0000ff">this</span>.info, <span style="color: #006080">'mouseout'</span>, <span style="color: #0000ff">this</span>.bind(<span style="color: #0000ff">this</span>.unshow,<span style="color: #0000ff">this</span>), <span style="color: #0000ff">false</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum48">  48:</span>         clearInterval(<span style="color: #0000ff">this</span>.timer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum49">  49:</span>         <span style="color: #0000ff">this</span>.timer = setInterval(<span style="color: #0000ff">this</span>.bind(<span style="color: #0000ff">function</span>(){<span style="color: #008000">//宽度变换</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum50">  50:</span>             <span style="color: #0000ff">if</span> (<span style="color: #0000ff">this</span>.info.clientWidth &lt; 156) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum51">  51:</span>                 <span style="color: #0000ff">this</span>.info.style.width = parseInt(<span style="color: #0000ff">this</span>.info.style.width) + 5 + <span style="color: #006080">&quot;px&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum52">  52:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum53">  53:</span>             <span style="color: #0000ff">else</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum54">  54:</span>                 clearInterval(<span style="color: #0000ff">this</span>.timer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum55">  55:</span>                 <span style="color: #0000ff">this</span>.$$(<span style="color: #0000ff">this</span>.textClass,<span style="color: #006080">'span'</span>,<span style="color: #0000ff">this</span>.info)[0].style.display=<span style="color: #006080">&quot;block&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum56">  56:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum57">  57:</span>         },<span style="color: #0000ff">this</span>), 5)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum58">  58:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum59">  59:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum60">  60:</span>     unshow:<span style="color: #0000ff">function</span>(e){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum61">  61:</span>         <span style="color: #0000ff">var</span> node=e.target?e.target.parentNode:e.srcElement.parentNode;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum62">  62:</span>         <span style="color: #0000ff">var</span> point = <span style="color: #0000ff">this</span>.getMousePoint(e);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum63">  63:</span>         <span style="color: #0000ff">var</span> picXY = <span style="color: #0000ff">this</span>.getPicXY(node);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum64">  64:</span>         <span style="color: #008000">//通过坐标比对，判断鼠标是否移出信息框区域</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum65">  65:</span>         <span style="color: #008000">//下面这个if括号语句可以删除，那样鼠标将不能放到文字区域</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum66">  66:</span>         <span style="color: #0000ff">if</span> (point.x &lt; picXY.x || point.x &gt; picXY.x + node.clientWidth || point.y &lt; picXY.y || point.y &gt; picXY.y + node.clientHeight) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum67">  67:</span>             clearInterval(<span style="color: #0000ff">this</span>.timer);<span style="color: #008000">//清除定时器</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum68">  68:</span>             <span style="color: #0000ff">this</span>.info.style.display = <span style="color: #006080">&quot;none&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum69">  69:</span>             <span style="color: #0000ff">this</span>.info.style.width = <span style="color: #006080">&quot;56px&quot;</span>;<span style="color: #008000">//宽度重置初始化</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum70">  70:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum71">  71:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum72">  72:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum73">  73:</span>     $:<span style="color: #0000ff">function</span>(id){<span style="color: #008000">//由id获取结点对象</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum74">  74:</span>         <span style="color: #0000ff">return</span> document.getElementById(id);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum75">  75:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum76">  76:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum77">  77:</span>     $$:<span style="color: #0000ff">function</span>(c, t, p){<span style="color: #008000">//c:className, t:tagName, p: praentNode。根据节点的class、结点标签类型、及其父级结点来获取一组符合条件的结点数组</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum78">  78:</span>         <span style="color: #0000ff">var</span> at = p.getElementsByTagName(t);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum79">  79:</span>         <span style="color: #0000ff">var</span> ms = <span style="color: #0000ff">new</span> Array();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum80">  80:</span>         <span style="color: #0000ff">var</span> r = <span style="color: #0000ff">new</span> RegExp(<span style="color: #006080">'(^|\\s)'</span> + c.replace(/\-/g, <span style="color: #006080">'\\-'</span>) + <span style="color: #006080">'(\\s|$)'</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum81">  81:</span>         <span style="color: #0000ff">var</span> e;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum82">  82:</span>         <span style="color: #0000ff">for</span> (<span style="color: #0000ff">var</span> i = 0; i &lt; at.length; i++) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum83">  83:</span>             e = at[i];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum84">  84:</span>             <span style="color: #0000ff">if</span> (r.test(e.className)) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum85">  85:</span>                 ms.push(e)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum86">  86:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum87">  87:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum88">  88:</span>         <span style="color: #0000ff">return</span> ms</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum89">  89:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum90">  90:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum91">  91:</span>     getMousePoint:<span style="color: #0000ff">function</span>(ev){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum92">  92:</span>         <span style="color: #0000ff">var</span> x,y;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum93">  93:</span>         <span style="color: #0000ff">if</span> (<span style="color: #0000ff">typeof</span> window.pageYoffset!= <span style="color: #006080">'undefined'</span>) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum94">  94:</span>             x = window.pageXOffset;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum95">  95:</span>             y = window.pageYOffset</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum96">  96:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum97">  97:</span>         <span style="color: #0000ff">else</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum98">  98:</span>             <span style="color: #0000ff">if</span> (<span style="color: #0000ff">typeof</span> document.compatMode != <span style="color: #006080">'undefined'</span> &amp;&amp; document.compatMode != <span style="color: #006080">'BackCompat'</span>) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum99">  99:</span>                 x = document.documentElement.scrollLeft;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum100"> 100:</span>                 y = document.documentElement.scrollTop</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum101"> 101:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum102"> 102:</span>             <span style="color: #0000ff">else</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum103"> 103:</span>                 <span style="color: #0000ff">if</span> (<span style="color: #0000ff">typeof</span> document.body != <span style="color: #006080">'undefined'</span>) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum104"> 104:</span>                     x = document.body.scrollLeft;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum105"> 105:</span>                     y = document.body.scrollTop</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum106"> 106:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum107"> 107:</span>         x += ev.clientX;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum108"> 108:</span>         y += ev.clientY;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum109"> 109:</span>         <span style="color: #0000ff">return</span> {<span style="color: #006080">'x'</span> <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> ,<span style="color: #006080">'y'</span>:y};</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum110"> 110:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum111"> 111:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum112"> 112:</span>     getPicXY:<span style="color: #0000ff">function</span>(o){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum113"> 113:</span>         <span style="color: #0000ff">var</span> x=y=0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum114"> 114:</span>         <span style="color: #0000ff">do</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum115"> 115:</span>             x += o.offsetLeft || 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum116"> 116:</span>             y += o.offsetTop  || 0;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum117"> 117:</span>             o = o.offsetParent;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum118"> 118:</span>         } <span style="color: #0000ff">while</span> (o);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum119"> 119:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum120"> 120:</span>         <span style="color: #0000ff">return</span> {<span style="color: #006080">'x'</span> <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> ,<span style="color: #006080">'y'</span>:y};</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum121"> 121:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum122"> 122:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum123"> 123:</span>     bind:<span style="color: #0000ff">function</span>(f,o){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum124"> 124:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">function</span>(){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum125"> 125:</span>             <span style="color: #0000ff">return</span> f.apply(o,arguments);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum126"> 126:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum127"> 127:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum128"> 128:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum129"> 129:</span>     hasClassName:<span style="color: #0000ff">function</span>(o, c){<span style="color: #008000">//判断o是否具有值为c的className</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum130"> 130:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">new</span> RegExp(<span style="color: #006080">&quot;(?:^|\\s+)&quot;</span> + c + <span style="color: #006080">&quot;(?:\\s+|$)&quot;</span>).test(o.className);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum131"> 131:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum132"> 132:</span>     </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum133"> 133:</span>     addClassName:<span style="color: #0000ff">function</span>(o, c){<span style="color: #008000">//给o添加名为c的className</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum134"> 134:</span>         <span style="color: #0000ff">if</span> (!<span style="color: #0000ff">this</span>.hasClassName(o, c)) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum135"> 135:</span>             o.className = [o.className, c].join(<span style="color: #006080">&quot; &quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum136"> 136:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum137"> 137:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum138"> 138:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum139"> 139:</span>     removeClassName:<span style="color: #0000ff">function</span>(o, c){<span style="color: #008000">//删除o的值为c的className</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum140"> 140:</span>         <span style="color: #0000ff">if</span> (<span style="color: #0000ff">this</span>.hasClassName(o, c)) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum141"> 141:</span>             <span style="color: #0000ff">var</span> a = o.className;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum142"> 142:</span>             o.className = a.replace(<span style="color: #0000ff">new</span> RegExp(<span style="color: #006080">&quot;(?:^|\\s+)&quot;</span> + c + <span style="color: #006080">&quot;(?:\\s+|$)&quot;</span>, <span style="color: #006080">&quot;g&quot;</span>), <span style="color: #006080">&quot; &quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum143"> 143:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum144"> 144:</span>     },</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum145"> 145:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum146"> 146:</span>     addListener:<span style="color: #0000ff">function</span>(e, n, o, u){<span style="color: #008000">//监听设置封装函数</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum147"> 147:</span>         <span style="color: #0000ff">if</span>(e.addEventListener) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum148"> 148:</span>             e.addEventListener(n, o, u);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum149"> 149:</span>             <span style="color: #0000ff">return</span> <span style="color: #0000ff">true</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum150"> 150:</span>         } <span style="color: #0000ff">else</span> <span style="color: #0000ff">if</span>(e.attachEvent) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum151"> 151:</span>             e[<span style="color: #006080">'e'</span> + n + o] = o;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum152"> 152:</span>             e[n + o] = <span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum153"> 153:</span>                 e[<span style="color: #006080">'e'</span> + n + o](window.<span style="color: #0000ff">event</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum154"> 154:</span>             };</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum155"> 155:</span>             e.attachEvent(<span style="color: #006080">'on'</span> + n, e[n + o]);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum156"> 156:</span>             <span style="color: #0000ff">return</span> <span style="color: #0000ff">true</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum157"> 157:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum158"> 158:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">false</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum159"> 159:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum160"> 160:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p><div class="inpostad"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/feedad.gif" /><a href="http://www.qiqiboy.com/bluepaled" title="点击下载bluePaled" target="_blank"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/adtest.png" alt="点击下载bluePaled" /></a></div></p>
<p>使用这段JS代码，你需要注意下你的页面结构，要在一个固定ID<sup><font color="#ff0000">1</font></sup>的div中输出若干li标签，li标签也要有一个className<sup><font color="#ff0000">2</font></sup>，然后在li标签中输出头像图片，同样的关于访客的姓名、评论数量也要在li标签下，并且放到一个span标签中，这个span标签页给加个className<sup><font color="#ff0000">3</font></sup>，最后在页面中加个显示访客信息的div，ID<sup><font color="#ff0000">4</font></sup>固定。</p>
<p>关于页面结构你可以使用firebug或相关工具查看我的友情链接页面的的读者墙的页面结构。也可以<strong><font style="background-color: #ffff00"><a href="http://u.115.com/file/f4d984d612" target="_blank">下载此demo包</a></font></strong>。</p>
<p>页面结构写好了，就可以使用<strong><u>new PicWall()</u></strong>来使用上面的js了，它的四个参数分别是上面的1、2、3、4标注。即最外层的div id，显示信息的div id，li标签的className，li标签下放置的读者信息的span标签的className。比如，我的友链页面的读者墙即使用 </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #0000ff">new</span> PicWall(<span style="color: #006080">'commentsWall'</span>,<span style="color: #006080">'info'</span>,<span style="color: #006080">'pic'</span>,<span style="color: #006080">'text'</span>);</pre>
<p><!--CRLF--></div>
</div>
<p>来调用JS。commenswall是我的读者墙那个大div的id，info是一个空的div的id，pic是li标签的class，text是头像旁的span标签的class。更详细的下载demo包自行查看。CSS样式代码也在demo包里。</p>
<p>效果预览，可<a href="http://u.boy.im/test" target="_blank"><strong><font color="#ff0000">查看此处</font></strong></a>（demo包里也有或者我的友链页面）。</p>
<p><img style="display: inline" title="11233" alt="11233" src="http://www.qiqiboy.com/wp-content/uploads/2010/09/11233.png" width="618" height="220" /></p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/code' rel='tag'>code</a>, <a href='http://www.qiqiboy.com/tags/html' rel='tag'>html</a>, <a href='http://www.qiqiboy.com/tags/javascript' rel='tag'>javascript</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a>, <a href='http://www.qiqiboy.com/tags/%e4%bb%a3%e7%a0%81' rel='tag'>代码</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html" title="读者墙效果【二】- 头像自由拖拽">读者墙效果【二】- 头像自由拖拽</a> (46)<br /><small>上一篇博文《我的读者墙展示（附所用JS代码）》中我分享了自己所用的读者墙JavaScript部分代码。其实关于读者墙我还写了一个版本的js效果，不过离我最终的效果还有差距（最终要实...</small></li><li><a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html" title="仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）">仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）</a> (97)<br /><small>效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓...</small></li><li><a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html" title="【效果测试展示篇】Ajax版即时侧边栏评论回复功能">【效果测试展示篇】Ajax版即时侧边栏评论回复功能</a> (68)<br /><small>自写了《博客加入若干Ajax效果》以来，在博客上陆续添加启用了一些ajax效果，一方面丰富博客体验，一方面也当做练习学习js的一种实践吧。昨天的时候，将wilin版的侧边栏最新评论...</small></li><li><a href="http://www.qiqiboy.com/2010/07/30/allows-you-to-paste-the-code-in-the-comments-box-free.html" title="让你的评论框自由粘贴代码">让你的评论框自由粘贴代码</a> (58)<br /><small>我前后试用了三种方法。

第一，我想写一个超级正则表达式，来直接将评论框中&lt;code&gt;&lt;/code&gt;包围的字符串中的“&lt;”转换为“&amp;lt;”。对于只有一对&lt;code&gt;&lt;/code&gt;标签...</small></li><li><a href="http://www.qiqiboy.com/2010/07/26/to-comment-box-to-add-text-formatting-editor.html" title="为评论框添加文字格式化编辑器">为评论框添加文字格式化编辑器</a> (80)<br /><small>我的代码遵寻以下几点效果：


  
    对于普通的加粗（&lt;strong&gt;）、倾斜（&lt;em&gt;）等，如果鼠标没有选择文字，则直接在光标位置处加上完整闭合的标签。然后光标定位到标签中...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/7x">http://qiqi.boy.im/7x<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comment-5294">先看看</a>say: 不知道这个到底有没有人看哦</li><li>2010年09月7日, <a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comment-5291">学夫子</a>say: 我也有读者墙的，我的是只显示名字没有头像</li><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comment-5241">QiQiBoY</a>say: 消灭44</li><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comment-5240">QiQiBoY</a>say: <a href="#comment-5227" rel="nofollow">@卢松松 </a> 
你用火狐还慢？我知道IE下有些问题，展开会很慢。。</li><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comment-5227">卢松松</a>say: js加载的好慢。不过看的出博主确实有点功底</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comment-5195">QiQiBoY</a>say: <a href="#comment-5193" rel="nofollow">@snowxh </a> 
。。干嘛看头像，看名字呀。。 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comment-5193">snowxh</a>say: <a href="#comment-5192" rel="nofollow">@QiQiBoY </a> 
我就是装萌一下！

我刚一看头像没反应过来你是谁。。。你这不行啊</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html#comment-5192">QiQiBoY</a>say: <a href="#comment-5191" rel="nofollow">@snowxh </a> 
消失几天，居然连邮箱头像都换了。。。 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html/feed</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>围观wordpress中文圈内好玩的spam</title>
		<link>http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html</link>
		<comments>http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comments</comments>
		<pubDate>Tue, 31 Aug 2010 12:43:55 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[Spam]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/08/31/%e5%9b%b4%e8%a7%82wordpress%e4%b8%ad%e6%96%87%e5%9c%88%e5%86%85%e5%a5%bd%e7%8e%a9%e7%9a%84spam.html</guid>
		<description><![CDATA[
<h3>类型九，两个蠢蛋型</h3>

<p><img style="display: inline" title="spam1" alt="spam1" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam1.png" width="576" height="90" /></p>

<p>你老板够蠢，居然不知道你在假装工作，你更蠢，明知道他在假装付你薪水，还为他工作浪费时间。</p>]]></description>
			<content:encoded><![CDATA[<h3>类型一，灌水马甲型</h3>
<p><img style="display: inline" title="spam6" alt="spam6" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam6.png" width="572" height="312" /></p>
<p>从12:26到13:26正好一个小时内换了三个马甲来发spam，看来时间把握这么精准，一定是定时spam的。</p>
<h3>类型二，无知装逼型</h3>
<p><img style="display: inline" title="spam7" alt="spam7" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam7.png" width="569" height="85" /></p>
<p>特点，客客气气的先说句客套话，然后就出现个傻逼的问题“你用的什么主题？”主题信息底部写有。</p>
<h3>类型三，谎话连篇型</h3>
<p><img style="display: inline" title="spam8" alt="spam8" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam8.png" width="558" height="97" /></p>
<p>其实一分钟也没在俺博客呆过。</p>
<h3>类型五，纯粹废话型</h3>
<p><img style="display: inline" title="spam9" alt="spam9" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam9.png" width="550" height="101" /></p>
<p>要是spam也能坐上沙发，那我真是发那篇文章时倒霉到家了，这都能和spam遇上！！！</p>
<h3>类型六，毫不羞耻吹捧型</h3>
<p><img style="display: inline" title="spam10" alt="spam10" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam10.png" width="517" height="80" /></p>
<p><img style="display: inline" title="spam11" alt="spam11" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam11.png" width="537" height="89" /></p>
<p>其实夸赞俺，俺也很高兴，但是别发错文章呀，这个spam却正好发在一篇写我上当受骗的文章下面，靠，我倒霉你还在下面叫好！！！</p>
<p>  <div class="inpostad"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/feedad.gif" /><a href="http://www.qiqiboy.com/bluepaled" title="点击下载bluePaled" target="_blank"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/adtest.png" alt="点击下载bluePaled" /></a></div><br />
<h3>类型七，论坛灌水积分党</h3>
<p><img style="display: inline" title="spam12" alt="spam12" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam12.png" width="575" height="320" /></p>
<p>这种贴子的出现源于很多人士想在天涯看连载小说，但是天涯一些论坛的功能只有一定积分才能使用，于是出现了一大堆类似的帖子，专门用来刷积分。</p>
<p>但是，拜托，我这里不是天涯论坛。</p>
<h3>类型八，狗咬狗</h3>
<p><img style="display: inline" title="spam0" alt="spam0" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam0.png" width="579" height="93" /></p>
<p>我想说的是，WP的垃圾评论早已出了，akismet。</p>
<h3>类型九，两个蠢蛋型</h3>
<p><img style="display: inline" title="spam1" alt="spam1" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam1.png" width="576" height="90" /></p>
<p>你老板够蠢，居然不知道你在假装工作，你更蠢，明知道他在假装付你薪水，还为他工作浪费时间。</p>
<h3>类型十，非人类</h3>
<p><img style="display: inline" title="spam2" alt="spam2" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam2.png" width="581" height="92" /></p>
<p>这位发评论的都说了，人家是咔咕。</p>
<h3>类型十一，类新手型</h3>
<p><img style="display: inline" title="spam3" alt="spam3" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam3.png" width="510" height="100" /></p>
<p>刚开博客的新手大概都会有段时间喜欢去别人博客留这样的话</p>
<h3>类型十二，alibibi</h3>
<p><img style="display: inline" title="spam4" alt="spam4" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam4.png" width="574" height="96" /></p>
<p>此位域名实在太个性。马云看到了就震精了。</p>
<h3>类型十三，让我无语型</h3>
<p><img style="display: inline" title="spam5" alt="spam5" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/spam5.png" width="549" height="90" /></p>
<p>男科医生都来了，还自称砖家，请问前列腺能治吗？</p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/comments' rel='tag'>comments</a>, <a href='http://www.qiqiboy.com/tags/spam' rel='tag'>Spam</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a>, <a href='http://www.qiqiboy.com/tags/%e8%af%84%e8%ae%ba' rel='tag'>评论</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/07/31/ajax-comments-amendment-on-a-small-problem.html" title="修正关于Ajax comments的一个小问题">修正关于Ajax comments的一个小问题</a> (39)<br /><small>很多人都用willin的Ajax comments，确实是一个非常好的功能，我也一直在用。

我用的版本还是很早期的版本了，期间willin进行了多次修改升级，我一直没动，甚至换了现在新主题还是使...</small></li><li><a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html" title="完美解决wordpress无限嵌套&lt;二&gt; 【邮件发送相关问题】">完美解决wordpress无限嵌套&lt;二&gt; 【邮件发送相关问题】</a> (80)<br /><small>但是，后来出现一个问题，让我不得不重新思考无限嵌套这一方式。这个问题就是邮件回复问题。了解我实现无限嵌套原理的，应该的都知道其实在对最后一层进行回复时，是在变相...</small></li><li><a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html" title="【原理指导篇】无时不在的评论 侧边栏即时回复功能">【原理指导篇】无时不在的评论 侧边栏即时回复功能</a> (24)<br /><small>
这个表单插入到页面上你有两种选择，一是预先在页面上输出一个完整的评论表单，如在footer.php处，注意要在&lt;body&gt;标签闭合前，然后设置display:none，使之在页面上隐藏。二是直接...</small></li><li><a href="http://www.qiqiboy.com/2010/08/05/added-edit-trackback-style-in-the-code.html" title="补充《修改trackback样式，统一评论外观》中代码">补充《修改trackback样式，统一评论外观》中代码</a> (35)<br /><small>导航：#trackbacks代码&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #代码解释   在《 修改trackback样式，统一评论外观 》中，我只是说了我对trackbacks的样式处理，并没有贴出代码，当然，原...</small></li><li><a href="http://www.qiqiboy.com/2010/07/30/allows-you-to-paste-the-code-in-the-comments-box-free.html" title="让你的评论框自由粘贴代码">让你的评论框自由粘贴代码</a> (58)<br /><small>我前后试用了三种方法。

第一，我想写一个超级正则表达式，来直接将评论框中&lt;code&gt;&lt;/code&gt;包围的字符串中的“&lt;”转换为“&amp;lt;”。对于只有一对&lt;code&gt;&lt;/code&gt;标签...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/7u">http://qiqi.boy.im/7u<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comment-5229">天毅</a>say: <a href="#comment-5225" rel="nofollow">@QiQiBoY </a> 
汗死，原来是博主发的召唤，A.shun只是rt。好吧，更正我的错误，围观正确的人…… <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_idea.gif' alt=':idea:' class='wp-smiley' /> </li><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comment-5228">天毅</a>say: 接到A.shun的召唤前来围观……</li><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comment-5225">QiQiBoY</a>say: <a href="#comment-5224" rel="nofollow">@CF</a>
速召唤推特党前来围观此人。。</li><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comment-5224">CF</a>say: 以后我每天到你这发垃圾评论</li><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comment-5223">海派</a>say: 大部分评论，最终目的都是打广告...不过有些BLOG对SEO是不起作用滴.. <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </li><li>2010年09月6日, <a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comment-5217">derek</a>say: <a href="#comment-5207" rel="nofollow">@QiQiBoY </a> 
没办法啦，可删可不删</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comment-5207">QiQiBoY</a>say: <a href="#comment-5204" rel="nofollow">@derek </a> 
一般人肉手动写的，只能算小广告了，人家顺便点评了日志，还算不错了。。</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html#comment-5206">QiQiBoY</a>say: <a href="#comment-5202" rel="nofollow">@sayisee </a> 
 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' />  已投</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html/feed</wfw:commentRss>
		<slash:comments>123</slash:comments>
		</item>
		<item>
		<title>JS延迟加载机制函数(Lazyload)</title>
		<link>http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html</link>
		<comments>http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comments</comments>
		<pubDate>Fri, 27 Aug 2010 05:40:10 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lazyload]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[延迟加载]]></category>
		<category><![CDATA[程序]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html</guid>
		<description><![CDATA[<p>另外一个问题是我的代码是只触发出现在可视区域中的节点动作，如果你想要实现在当前浏览的页面以上部分的节点全部要加载，那么可以将代码的第20行去掉<font style="background-color: #ffff00">Math.abs</font>即可。如果要实现在滚动到距目标节点一定高度时就开始触发函数，那么可将20行的seeY改为<font style="background-color: #ffff00">seeY+200</font>(200即为设定的距离高度)。</p>

<p>关于lazyload的一个具体的实现，就还拿图片的延迟加载来说吧。你可以将图片的地址都改成一个默认的小图片（这个可以在后台用php直接修改输出，也可以用js实现），将正真的图片地址存到图片的alt属性中（也可以指定一个自定义的属性），然后对每个图片绑定new lazyload，要触发的动作函数就是将alt中的值赋给src即可。这样，就实现了图片的lazyload（你就可以消灭jQuery，消灭jQuery的lazyload插件了，也就消灭了那100来K的JS文件）。如果再结合ajax技术，那么也就可以实现如我博客一样的模块延迟加载了。<img style="display: inline" title="捕获" alt="捕获" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/8dc355b5c5e9.png" width="640" height="248" /></p>]]></description>
			<content:encoded><![CDATA[<p>最近应该大家都发现了，我的博客很多模块都使用了延迟加载技术。这个延迟加载(lazyload)我第一次听说其实还是不久前，那是在别人博客看到介绍的一个基于jQuery的图片延迟加载插件。我对这个很感兴趣，其实很多网站也都应用了这个技术，尤其是大型网站，可以有效地减少服务器压力。</p>
<p>我原先觉得这个技术挺神秘的，实现起来应该比较困难，并且在网上也并没有找到相关的文章或者介绍。但是当我真正决定要去这样做时，却发现其实这个真的挺简单的，原理也容易理解。</p>
<p>lazyload，简单地说，就是在浏览器滚动到某个位置时再出发相关函数，实现页面元素的加载或者某些动作的执行。浏览器的滚动位置检测，可以通过一个定时器来循环检测，通过比较某一时刻页面目标节点位置和浏览器滚动条高度来判断需不要要执行函数。我将这个方法写成了一个类，我自己博客即是使用我的这个方法。</p>
<p>（下面代码纯属自己的小试手，如果有不完善地方可以指出） </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #0000ff">function</span> Lazyload(func, obj) {<span style="color: #008000">//obj目标节点对象, func要触发的函数</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span>     <span style="color: #0000ff">this</span>.func = func;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span>     <span style="color: #0000ff">this</span>.obj = obj;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span>     <span style="color: #0000ff">this</span>.it = setInterval(<span style="color: #0000ff">function</span>() {<span style="color: #008000">//2s检查一次</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span>         <span style="color: #0000ff">this</span>.checkScroll();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>     }.bind(<span style="color: #0000ff">this</span>), 2000);<span style="color: #008000">//bind为setInterval绑定lazyload对象，否则this会指向window对象</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span> Function.prototype.bind = <span style="color: #0000ff">function</span>(obj) {<span style="color: #008000">//对象绑定</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>     <span style="color: #0000ff">var</span> __method = <span style="color: #0000ff">this</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span>     <span style="color: #0000ff">return</span> <span style="color: #0000ff">function</span>() { </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum12">  12:</span>         <span style="color: #0000ff">return</span> __method.apply(obj, arguments); </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum13">  13:</span>     };</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum14">  14:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum15">  15:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum16">  16:</span> Lazyload.prototype.checkScroll = <span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum17">  17:</span>     <span style="color: #0000ff">var</span> scrollY = document.body.scrollTop || document.documentElement.scrollTop || window.pageYOffset || 0,<span style="color: #008000">//页面滚动条高度</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum18">  18:</span>         seeY = window.innerHeight||document.documentElement.clientHeight,<span style="color: #008000">//浏览器可视区域高度</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum19">  19:</span>         func = <span style="color: #0000ff">this</span>.func;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum20">  20:</span>     <span style="color: #0000ff">if</span> (Math.abs(<span style="color: #0000ff">this</span>.getY() - scrollY) &lt; seeY) {<span style="color: #008000">//当目标节点进入可视区域，即页面滚动条高度减去节点距页面顶部距离小于浏览器可视高度</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum21">  21:</span>         clearInterval(<span style="color: #0000ff">this</span>.it);<span style="color: #008000">//清除定时器</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum22">  22:</span>         <span style="color: #0000ff">return</span> func();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum23">  23:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum24">  24:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum25">  25:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum26">  26:</span> Lazyload.prototype.getY=<span style="color: #0000ff">function</span>(){<span style="color: #008000">//目标节点距页面顶部高度</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum27">  27:</span>     <span style="color: #0000ff">var</span> obj=<span style="color: #0000ff">this</span>.obj;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum28">  28:</span>     tp = obj.offsetTop;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum29">  29:</span>     <span style="color: #0000ff">if</span> (obj.offsetParent) <span style="color: #0000ff">while</span> (obj = obj.offsetParent) tp += obj.offsetTop;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum30">  30:</span>     <span style="color: #0000ff">return</span> tp;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum31">  31:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>关于代码的一些解释都在注释里了。如何使用呢？</p>
<p><div class="inpostad"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/feedad.gif" /><a href="http://www.qiqiboy.com/bluepaled" title="点击下载bluePaled" target="_blank"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/adtest.png" alt="点击下载bluePaled" /></a></div></p>
<p>使用这个方法要通过new来新建类对象的方法。参数func即是要触发的函数，obj即是页面上某个节点对象，即当此obj节点进入可视区域时（浏览器滚动到此处）即触发func函数。比如，你要实现当浏览器滚动到页面上id为“test”的节点（b）时触发弹出窗口alert(‘yes’),可以这么做 </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #0000ff">function</span> a(){alert(<span style="color: #006080">'yes'</span>);}<span style="color: #008000">//要出发的函数</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span> <span style="color: #0000ff">var</span> b=document.getElementById(<span style="color: #006080">'tests'</span>);<span style="color: #008000">//获取页面节点</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span> <span style="color: #0000ff">new</span> Lazyload(a,b);<span style="color: #008000">//使用new关键字建立对象执行</span></pre>
<p><!--CRLF--></div>
</div>
<p>以上就是我自己的lazyload的全部代码与实现方式了。当然，我相信它还有改进之处。</p>
<p>补充一些其他的东西：</p>
<p>我的代码中定时检测的时间设定是2s，也就是说每两秒去比较一次。如果你浏览器拖动太快，目标节点被很快的一闪而过，很可能此时就刚好没有执行checkScroll函数，所以也就不会触发动作了。你可以将时间改为更小的值（在第6行），如500ms，可以避免大多数的快速拖动造成的问题。当然，我觉得其实没必要，如果某人很快的拖动滚动条，说明他要浏览的东西在页面底部，那么其实是没必要加载他快速拖动过的节点的，所以2s我觉得是一个很合理的值。</p>
<p>另外一个问题是我的代码是只触发出现在可视区域中的节点动作，如果你想要实现在当前浏览的页面以上部分的节点全部要加载，那么可以将代码的第20行去掉<font style="background-color: #ffff00">Math.abs</font>即可。如果要实现在滚动到距目标节点一定高度时就开始触发函数，那么可将20行的seeY改为<font style="background-color: #ffff00">seeY+200</font>(200即为设定的距离高度)。</p>
<p>关于lazyload的一个具体的实现，就还拿图片的延迟加载来说吧。你可以将图片的地址都改成一个默认的小图片（这个可以在后台用php直接修改输出，也可以用js实现），将正真的图片地址存到图片的alt属性中（也可以指定一个自定义的属性），然后对每个图片绑定new lazyload，要触发的动作函数就是将alt中的值赋给src即可。这样，就实现了图片的lazyload（你就可以消灭jQuery，消灭jQuery的lazyload插件了，也就消灭了那100来K的JS文件）。如果再结合ajax技术，那么也就可以实现如我博客一样的模块延迟加载了。<img style="display: inline" title="捕获" alt="捕获" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/8dc355b5c5e9.png" width="640" height="248" /></p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/javascript' rel='tag'>javascript</a>, <a href='http://www.qiqiboy.com/tags/lazyload' rel='tag'>lazyload</a>, <a href='http://www.qiqiboy.com/tags/%e4%bb%a3%e7%a0%81' rel='tag'>代码</a>, <a href='http://www.qiqiboy.com/tags/%e5%bb%b6%e8%bf%9f%e5%8a%a0%e8%bd%bd' rel='tag'>延迟加载</a>, <a href='http://www.qiqiboy.com/tags/%e7%a8%8b%e5%ba%8f' rel='tag'>程序</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/08/08/javascript-page-document-initialize-window-onload-alternative.html" title="JavaScript页面文档初始化 window.onload的替代办法">JavaScript页面文档初始化 window.onload的替代办法</a> (49)<br /><small>很早，大概去年就在mg12的博客看到他一篇很久以前的文章《 JavaScript 初始化装载方法 》，当时也没注意。这两天在做页面一些部分的延迟加载时，又想起了这个，因为使用window.onload...</small></li><li><a href="http://www.qiqiboy.com/2010/07/14/a-simple-comment-box-counter.html" title="评论框的简单计数器（无需改动模板，附带输入字数限制功能）">评论框的简单计数器（无需改动模板，附带输入字数限制功能）</a> (27)<br /><small>来过我博客的都知道，我博客很早在评论框右下角就有个小小的计数器，可以显示你在评论框中输入的字数。这个功能很简单，配合模板，其实一两句js代码就能搞定。偶尔有人向我问...</small></li><li><a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html" title="读者墙效果【二】- 头像自由拖拽">读者墙效果【二】- 头像自由拖拽</a> (46)<br /><small>上一篇博文《我的读者墙展示（附所用JS代码）》中我分享了自己所用的读者墙JavaScript部分代码。其实关于读者墙我还写了一个版本的js效果，不过离我最终的效果还有差距（最终要实...</small></li><li><a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html" title="我的读者墙展示（附所用JS代码）">我的读者墙展示（附所用JS代码）</a> (47)<br /><small>好多人都在博客上弄了个读者墙，我之前也搞过，但是换了新主题之后就没再添加了。所以抽了个时间，在links页面加了读者墙，展示的是最近三个月内的评论数量在前72名的访客头像...</small></li><li><a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html" title="仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）">仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）</a> (97)<br /><small>效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/7s">http://qiqi.boy.im/7s<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comment-5169">捷易通</a>say: 原来是lazy技术呀！</li><li>2010年09月2日, <a href="http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comment-5012">QiQiBoY</a>say: <a href="#comment-5006" rel="nofollow">@oYoo </a> 
本来就是挺酷的技术。。。 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' /> </li><li>2010年09月2日, <a href="http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comment-5006">oYoo</a>say: 延迟加载，感觉很酷。</li><li>2010年08月31日, <a href="http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comment-4883">QiQiBoY</a>say: <a href="#comment-4876" rel="nofollow">@阿吴 </a> 
呵呵。。没事瞎折腾的。。</li><li>2010年08月31日, <a href="http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comment-4876">阿吴</a>say: 你的博客好多赞的技术</li><li>2010年08月31日, <a href="http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comment-4865">小邪</a>say: <a href="#comment-4857" rel="nofollow">@liuqiqi </a> 
哇，果然够专业，嘿嘿 ~ 谢啦 ~</li><li>2010年08月30日, <a href="http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comment-4857">liuqiqi</a>say: <a href="#comment-4856" rel="nofollow">@小邪 </a> 
简单。。。直接给你教程。。<strong><a href="http://www.neoease.com/wordpress-at-reply/" rel="nofollow">http://www.neoease.com/wordpress-at-reply/</a></strong></li><li>2010年08月30日, <a href="http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html#comment-4856">小邪</a>say: 对鸟，能不能把下面这段代码也改成纯js的 ~
那样我就可以脱离jquery的100多K鸟 ~
<code>		&lt;script type="text/javascript"&gt; 

jQuery(document).ready(function($){$('.reply').click(function(){var atid='"#'+$(this).parent().attr("id")+'"';var atname=$(this).prevAll().find('cite:first').text();$("#comment").attr("value","&lt;a href="+atid+" rel="+'"nofollow"'+"&gt;@"+atname+" &lt;/a&gt;, ").focus()});$('.cancel-comment-reply a').click(function(){$("#comment").attr("value",'')})})

	&lt;/script&gt;
</code></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/08/27/js-delayed-loading-mechanism-function-lazyload.html/feed</wfw:commentRss>
		<slash:comments>88</slash:comments>
		</item>
		<item>
		<title>完美解决wordpress无限嵌套&lt;二&gt; 【邮件发送相关问题】</title>
		<link>http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html</link>
		<comments>http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:45:37 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[嵌套]]></category>
		<category><![CDATA[程序]]></category>
		<category><![CDATA[评论]]></category>
		<category><![CDATA[邮件]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html</guid>
		<description><![CDATA[<img class="alignleft" src="http://www.qiqiboy.com/wp-content/uploads/2010/07/111.png" alt="wordpress嵌套" title="wordpress嵌套" ><p>但是，后来出现一个问题，让我不得不重新思考无限嵌套这一方式。这个问题就是邮件回复问题。了解我实现无限嵌套原理的，应该的都知道其实在对最后一层进行回复时，是在变相的对倒数第二层进行回复。很多人可能在使用<strong>willin</strong>修改的邮件发送方式，即是通过<strong>hook</strong>到<strong>comment_post</strong>，获取新评论的父级评论ID，如果ID不为0，说明这是一条子评论，然后就将邮件发送给父级评论。父级评论的邮箱是来自get_comment()函数获取数据库查询。前面已经说了，对最后一层的回复是<font style="background-color: #ffff00">变相地对倒数第二层进行回复</font>，所以此时邮件全部发送到倒数第二层那里去了。</p>

<p>我注意到上面的问题，来自于一次我在开发自己的ajax评论时对我在最后一层的评论进行回复测试时，结果zww跑来跟我说，收到一大堆我的邮件。我研究了一下，发现存在上述问题，在搁置了N天后，今天我终于解决了它。</p>

<p>这个问题的解决需要换个思路，不能还是局限于通过查询一条评论的父级ID来判断需不需要发送邮件。我注意到我的每条评论中都有@回复链接，而其中的href中就包含了被回复者的评论id，所以我就从这里着手，想通过获取评论中的存在的@回复来进行邮件发送。而且这种方式，你可以一次回复多个人，比如你想在一条评论里同时回复A、B、C三个人，你只需要依次点击A、B、C下面的reply按钮（如果不想让评论框出现在这三人任何一人下方，则点击一下取消回复，评论框会回到底部，这条回复会被当做一条主评论。但是，别担心，评论框内容不会清空，你的回复依然会通过邮件发送至这三人），然后书写回复内容即可。</p>]]></description>
			<content:encoded><![CDATA[<p>我曾在《<a href="http://www.qiqiboy.com/2010/07/07/perfect-solution-wordpress-nested-layers-deep-back-problems.html"><strong><font color="#ff0000">完美解决WordPress嵌套回复的层深问题（无限嵌套）&lt;一&gt;</font></strong></a>》中分享了我对wordpress中嵌套深度有限的应对解决办法。有同学注意到了我标题中的<font style="background-color: #ffff00"><u>&lt;一&gt;</u></font>，所以问我<font style="background-color: #d19049">&lt;二&gt;</font>何时出来。我回答说，没有二了，因为这个已经是完美的了，标题中的一是无意中加进去的。</p>
<p>但是，后来出现一个问题，让我不得不重新思考无限嵌套这一方式，从而也就有了本文——《完美无限嵌套&lt;二&gt;》。这个问题就是邮件回复问题。了解我实现无限嵌套原理的，应该的都知道其实在对最后一层进行回复时，是在变相的对倒数第二层进行回复。很多人可能在使用<strong>willin</strong>修改的邮件发送方式，即是通过<strong>hook</strong>到<strong>comment_post</strong>，获取新评论的父级评论ID，如果ID不为0，说明这是一条子评论，然后就将邮件发送给父级评论。父级评论的邮箱是来自get_comment()函数获取数据库查询。前面已经说了，对最后一层的回复是<font style="background-color: #ffff00">变相地对倒数第二层进行回复</font>，所以此时邮件全部发送到倒数第二层那里去了。</p>
<p>我注意到上面的问题，来自于一次我在开发自己的ajax评论时对我在最后一层的评论进行回复测试时，结果zww跑来跟我说，收到一大堆我的邮件。我研究了一下，发现存在上述问题，在搁置了N天后，今天我终于解决了它。</p>
<p>这个问题的解决需要换个思路，不能还是局限于通过查询一条评论的父级ID来判断需不需要发送邮件。我注意到我的每条评论中都有@回复链接，而其中的href中就包含了被回复者的评论id，所以我就从这里着手，想通过获取评论中的存在的@回复来进行邮件发送。而且这种方式，你可以一次回复多个人，比如你想在一条评论里同时回复A、B、C三个人，你只需要依次点击A、B、C下面的reply按钮（如果不想让评论框出现在这三人任何一人下方，则点击一下取消回复，评论框会回到底部，这条回复会被当做一条主评论。但是，别担心，评论框内容不会清空，你的回复依然会通过邮件发送至这三人），然后书写回复内容即可。</p>
<p>主要代码如下：</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #0000ff">function</span> comment_mail_notify($comment_id) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span>     $comment = get_comment($comment_id);<span style="color: #008000">//根据id获取这条评论相关数据</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span>     $content = $comment-&gt;comment_content;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span>     <span style="color: #008000">//对评论内容进行匹配</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span>     $match_count=preg_match_all(<span style="color: #006080">'/&lt;a href=&quot;#comment-([0-9]+)?&quot; rel=&quot;nofollow&quot;&gt;/si'</span>,$content,$matchs);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>     <span style="color: #0000ff">if</span>($match_count&gt;0){<span style="color: #008000">//如果匹配到了</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span>         <span style="color: #0000ff">foreach</span>($matchs[1] <span style="color: #0000ff">as</span> $parent_id){<span style="color: #008000">//对每个子匹配都进行邮件发送操作</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span>             SimPaled_send_email($parent_id,$comment);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>     }elseif($comment-&gt;comment_parent!=<span style="color: #006080">'0'</span>){<span style="color: #008000">//以防万一，有人故意删了@回复，还可以通过查找父级评论id来确定邮件发送对象</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span>         $parent_id=$comment-&gt;comment_parent;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum12">  12:</span>         SimPaled_send_email($parent_id,$comment);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum13">  13:</span>     }<span style="color: #0000ff">else</span> <span style="color: #0000ff">return</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum14">  14:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum15">  15:</span> add_action(<span style="color: #006080">'comment_post'</span>, <span style="color: #006080">'comment_mail_notify'</span>);</pre>
<p><!--CRLF--></div>
</div>
<p>然后就是发送邮件的函数，简单给个思路 </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #0000ff">function</span> SimPaled_send_email($parent_id,$comment){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span>     $admin_email = get_bloginfo (<span style="color: #006080">'admin_email'</span>);<span style="color: #008000">//管理员邮箱</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span>     $parent_comment=get_comment($parent_id);<span style="color: #008000">//获取被回复人（或叫父级评论）相关信息</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span>     $author_email=$comment-&gt;comment_author_email;<span style="color: #008000">//评论人邮箱</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span>     $to = trim($parent_comment-&gt;comment_author_email);<span style="color: #008000">//被回复人邮箱</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>     $spam_confirmed = $comment-&gt;comment_approved;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span>     <span style="color: #0000ff">if</span> ($spam_confirmed != <span style="color: #006080">'spam'</span> &amp;&amp; $to != $admin_email &amp;&amp; $to != $author_email) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span>         ....<span style="color: #008000">//自由发挥</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span>         wp_mail( $to, $subject, $message, $headers );</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>至此，就完美解决了邮件发送混乱这一问题。你可以在我这里测试，你的任何回复都会准确无误的发送至你要回复的人。</p>
<p>需要注意的是，对评论内容进行匹配@回复相关内容时，你的@回复需要符合上面正则里的规则。我建议，在向评论框里添加@回复时，依照此格式 </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> &lt;a href=<span style="color: #006080">&quot;comment-&quot;</span>$id&gt;@XXX &lt;/a&gt;</pre>
<p><!--CRLF--></div>
</div>
<p>你不用画蛇添足去往里面添加什么rel=”nofollow”，因为wordpress会自动给评论里的链接添加这一属性。</p>
<p>然后，当然，只以上部分两段代码就完了吗？如果有人引用了另外一条带@回复的评论，是不是也应该先剥离&lt;blockquote&gt;标签内容里的内容呢？否则，被引用人所回复的那个人不是也会被发送一封邮件吗？这些不是本文内容，所以不在此讨论，仅作提醒。 </p>
<hr /><strong>转载注明本文地址,谢谢</strong>。 </p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/email' rel='tag'>email</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a>, <a href='http://www.qiqiboy.com/tags/%e5%b5%8c%e5%a5%97' rel='tag'>嵌套</a>, <a href='http://www.qiqiboy.com/tags/%e7%a8%8b%e5%ba%8f' rel='tag'>程序</a>, <a href='http://www.qiqiboy.com/tags/%e8%af%84%e8%ae%ba' rel='tag'>评论</a>, <a href='http://www.qiqiboy.com/tags/%e9%82%ae%e4%bb%b6' rel='tag'>邮件</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/07/07/perfect-solution-wordpress-nested-layers-deep-back-problems.html" title="完美解决WordPress嵌套回复的层深问题（无限嵌套）&lt;一&gt;">完美解决WordPress嵌套回复的层深问题（无限嵌套）&lt;一&gt;</a> (50)<br /><small>很久以前看到过此篇文章《JQuery为WordPress的嵌套回复添加@reply功能》，文中所讲方法也很简单，就是利用jQuery的 克隆功能（clone()）将最后一层的父级评论的回复按钮给copy到最后一层...</small></li><li><a href="http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html" title="围观wordpress中文圈内好玩的spam">围观wordpress中文圈内好玩的spam</a> (123)<br /><small>
类型九，两个蠢蛋型



你老板够蠢，居然不知道你在假装工作，你更蠢，明知道他在假装付你薪水，还为他工作浪费时间。...</small></li><li><a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html" title="【原理指导篇】无时不在的评论 侧边栏即时回复功能">【原理指导篇】无时不在的评论 侧边栏即时回复功能</a> (24)<br /><small>
这个表单插入到页面上你有两种选择，一是预先在页面上输出一个完整的评论表单，如在footer.php处，注意要在&lt;body&gt;标签闭合前，然后设置display:none，使之在页面上隐藏。二是直接...</small></li><li><a href="http://www.qiqiboy.com/2010/08/05/added-edit-trackback-style-in-the-code.html" title="补充《修改trackback样式，统一评论外观》中代码">补充《修改trackback样式，统一评论外观》中代码</a> (35)<br /><small>导航：#trackbacks代码&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #代码解释   在《 修改trackback样式，统一评论外观 》中，我只是说了我对trackbacks的样式处理，并没有贴出代码，当然，原...</small></li><li><a href="http://www.qiqiboy.com/2010/07/31/ajax-comments-amendment-on-a-small-problem.html" title="修正关于Ajax comments的一个小问题">修正关于Ajax comments的一个小问题</a> (39)<br /><small>很多人都用willin的Ajax comments，确实是一个非常好的功能，我也一直在用。

我用的版本还是很早期的版本了，期间willin进行了多次修改升级，我一直没动，甚至换了现在新主题还是使...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/7n">http://qiqi.boy.im/7n<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comment-5185">QiQiBoY</a>say: <a href="#comment-5183" rel="nofollow">@zwwooooo </a> 
恩，确实，谢谢提醒哈。</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comment-5183">zwwooooo</a>say: 折腾了，文章代码有个小错误，第3行代码：$content=comment-&gt;comment_content;少了$</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comment-5182">QiQiBoY</a>say: <a href="#comment-5179" rel="nofollow">@winy </a> 
嵌套层数足够深，就不会出现邮件发送混乱问题。你的不用改了。
<blockquote>变相地对倒数第二层进行回复，所以此时邮件全部发送到倒数第二层那里去了。</blockquote>这句在我这里是指如果你对第五层进行回复，其实是在对第四层进行回复，所以如果使用wilin原来的邮件回复，就会发送到第四层那个人那里去了。</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comment-5180">winy</a>say: <a href="#comment-5178" rel="nofollow">@QiQiBoY </a> 
就是这个意思 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_lol.gif' alt=':lol:' class='wp-smiley' /> </li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comment-5179">winy</a>say: <a href="#comment-5177" rel="nofollow">@QiQiBoY </a> 
没说清楚，我的意思是如果嵌套层数足够深，就不会出现<blockquote>变相地对倒数第二层进行回复，所以此时邮件全部发送到倒数第二层那里去了。</blockquote>这种情况了，是不是？</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comment-5178">QiQiBoY</a>say: <a href="#comment-5176" rel="nofollow">@winy </a> 
我是说嵌套1000层也能发送。。。
没有使用我的那个无限嵌套方法，而是通过修改wordpress嵌套层数来达到无限嵌套的，就没必要用我这个邮件发送了，因为每条回复总有一个唯一的父级评论。</li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comment-5177">QiQiBoY</a>say: <a href="#comment-5176" rel="nofollow">@winy </a> 
嵌套100层也能正确发送。。。 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </li><li>2010年09月5日, <a href="http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html#comment-5176">winy</a>say: 我嵌套999层，不会乱吧，懒得改了，没有多重@不会乱</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/08/23/perfect-solution-wordpress-unlimited-nested-2.html/feed</wfw:commentRss>
		<slash:comments>80</slash:comments>
		</item>
		<item>
		<title>插件发布：边栏最新评论及ajax回复&#8212;&#8212;WP RC Reply AJAX</title>
		<link>http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html</link>
		<comments>http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comments</comments>
		<pubDate>Fri, 20 Aug 2010 14:03:27 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[WP-RC-Reply-AJAX]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html</guid>
		<description><![CDATA[<img style="border-bottom: rgb(170,170,170) 2px solid; border-left: rgb(170,170,170) 2px solid; display: inline; border-top: rgb(170,170,170) 2px solid; border-right: rgb(170,170,170) 2px solid" class="wlDisabledImage sided" title="边栏回复" alt="边栏回复" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/e7eecd6c520f.png" width="274" height="240" /><p>从名字上看，第一个单词——<strong>wordpress</strong>，顾名思义，就是为wordpress而开发。<strong>recent comments</strong>，最新评论，即是可以在侧边栏显示最新评论，这个功能和mg12的wp-recentcomments插件几乎一模一样，支持ajax翻页、查看单条评论。当然，mg12的插件设置很丰富，而且也有jQuery版本，可以在翻页时实现一些特效。我的在第一版中就只提供了基本的功能，特效并未添加，以后的版本中会更新上去。当然，都是原生JS，不会有jQuery版本。<strong>reply</strong>，表明了这个插件最重要的一个功能，即是侧边栏回复。还不知道此为何物的同学，可以移步到我的侧边栏，点击任一评论后边的<strong>右向双箭头</strong>，进入单条评论查看模式，会出现一个回复按钮，点击之后就可以再侧边栏对这条评论进行回复了。<strong>ajax</strong>，即是评论支持ajax方式提交。这项是不可选的，如果浏览器支持JavaScript，那么就一定是ajax方式提交的，如果不支持，那么还可以以普通方式提交。</p>]]></description>
			<content:encoded><![CDATA[<p><font size="5">插件下载地址：<strong><a href="http://wordpress.org/extend/plugins/wp-rc-reply-ajax/" target="_blank"><font color="#ff0000"><u>官方目录</u></font></a></strong></font></p>
<p><font style="font-size: 18pt">如何使用？可以在后台添加小工具，或者直接调用相关函数，详查下文<font style="background-color: #ffff00">支持边栏小工具</font>一栏</font></p>
<p><font style="font-size: 18pt"><strong></strong></font></p>
<p><font color="#ff0000" size="4"><strong>文章导航<font color="#0000ff">：#<a href="#p1" target="_blank"><font color="#0000ff">为什么使用边栏回复？</font></a></font></strong></font></p>
<p><font style="font-size: 13.6pt" size="4"><strong><font color="#0000ff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #</font><a href="#p2" target="_blank"><font color="#0000ff">防止重复评论</font></a></strong></font></p>
<p><font style="font-size: 13.6pt"><strong><font color="#0000ff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #</font><a href="#p3" target="_blank"><font color="#0000ff">完美无限嵌套</font></a></strong></font></p>
<p><font style="font-size: 13.6pt"><strong><font color="#0000ff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #</font><a href="#p4" target="_blank"><font color="#0000ff">支持widget小工具</font></a></strong></font></p>
<p><font style="font-size: 13.6pt"><strong><font color="#0000ff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #</font><a href="#p5" target="_blank"><font color="#0000ff">其他说明</font></a></strong></font></p>
<p><font style="font-size: 13.6pt"><strong><font color="#0000ff">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #</font><a href="#p6" target="_blank"><font color="#0000ff">插件简介</font></a></strong></font></p>
<p>之前在<a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html" target="_blank">《<strong><u>Ajax版即时侧边栏评论回复功能</u></strong></a>》一文中我已经提到了我的侧边栏回复，我将其稍作改造，做成了今天的这个插件，名字叫<a href="http://www.qiqiboy.com/plugins/wp-rc-reply-ajax" target="_blank"><font color="#ff0000">WP RC Reply AJAX</font></a>，全称是wordpress recent comments reply ajax。</p>
<p>从名字上看，第一个单词——<strong>wordpress</strong>，顾名思义，就是为wordpress而开发。<strong>recent comments</strong>，最新评论，即是可以在侧边栏显示最新评论，这个功能和mg12的wp-recentcomments插件几乎一模一样，支持ajax翻页、查看单条评论。当然，mg12的插件设置很丰富，而且也有jQuery版本，可以在翻页时实现一些特效。我的在第一版中就只提供了基本的功能，特效并未添加，以后的版本中会更新上去。当然，都是原生JS，不会有jQuery版本。<strong>reply</strong>，表明了这个插件最重要的一个功能，即是侧边栏回复。还不知道此为何物的同学，可以移步到我的侧边栏，点击任一评论后边的<strong>右向双箭头</strong>，进入单条评论查看模式，会出现一个回复按钮，点击之后就可以再侧边栏对这条评论进行回复了。<strong>ajax</strong>，即是评论支持ajax方式提交。这项是不可选的，如果浏览器支持JavaScript，那么就一定是ajax方式提交的，如果不支持，那么还可以以普通方式提交。</p>
<h3 id="p1">为什么要使用侧边栏回复</h3>
<p>也许有人会这么问。我们博客每天都有人留言评论，但是这些评论并不都在同一个页面。而通过边栏的最新评论，我们可以对最新评论一目了然。如果你的最新评论支持ajax翻页查看，那就更好了，无论新收到了多少条评论，都可以通过翻页方式查看到，不必到后台，更不必一页一页的去翻找评论了。同时，我的插件提供了侧边栏回复功能，也就是说你在翻看这些评论的时候，就可以即时对它们进行回复了。而且是通过ajax方式，你回复完一条，可以点击返回按钮，继续对下一条评论进行回复。这些操作中，你并不需要跳转页面，因为一切都是通过ajax异步方式进行的。</p>
<h4 id="p2">防止重复评论</h4>
<p>而且，我提供了简单的防止重复回复的功能。边栏的评论一条接一条，我们可能在连续的回复过程中会记不清已经对谁回复过了，这样就会出现对同一条评论回复多次的情况。但是，不用担心，插件已考虑到此情况，回复过的评论在你试图再次回复时，会出现提醒。</p>
<h4 id="p3">完美嵌套，无限嵌套式回复</h4>
<p>很多人使用嵌套评论。因为在侧边栏显示的评论，我们很难判断其到底是不是嵌套的最后一层了，如果对最后一层的评论回复了，那么就是无效的嵌套回复，这条回复会被当做一条全新的主评论显示。我的插件解决了这一问题，你可以在边栏放心的进行回复，无论你使不使用嵌套，都不必担心，插件会完美解决你的嵌套难题。</p>
<p>回复会自动添加@回复，免去你折腾麻烦。</p>
<h4>提高访客体验，折叠隐藏信息输入框</h4>
<p>对于回复时插入的回复框，支持老访客折叠信息框，提高访客体验。同时支持登陆者隐藏信息框。</p>
<h4 id="p4">支持widget小工具</h4>
<p><strong>你可以直接在后台小工具设置页面添加“边栏回复小工具”到你的边栏。</strong></p>
<p><strong>如果不想使用小工具，我也提供了一个输出函数 </strong></p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><strong><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> &lt;?php wp_rc_reply_echo ($number=8); ?&gt;</strong></pre>
<p><!--CRLF--></div>
</div>
<p><strong>函数只有一个参数，即是显示的评论条数。其直接在要显示的地方进行调用即可。其它参数，如头像大小，截断长度等，请到后台插件设置页面进行设置。</strong></p>
<h4 id="p5">其它说明</h4>
<p><img style="margin: 0px 10px 0px 0px; display: inline" title="捕获" alt="捕获" align="left" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/1de9fb000bac.png" width="309" height="93" />后台设置中有一个“太短的评论自动换行”。这个如果不清楚是做什么的，就不要勾选，不要管它即可。我在此简单说明一下，这是我插件中的一个小功能，即是遇到很短的评论，不足设置的截断长度一般的评论，会自动在评论者姓名和评论内容之间加上换行符。当然，这一前提是你设置的头像大小大于32，因为大于32，一般头像右边可以显示两行评论内容（如我的最新评论），但是如果是太短的评论，则只能占据一行，那么下一行就会空了，此时就会显得不太美观，所以需要加上一个换行符，是评论内容在第二行显示。效果请查看我的边栏最新评论，注意观察一条长评论和一条段评论的显示上的区别。也可以参看左上角的截图，winy的评论是在第一行就开始显示的，而liuqiqi的评论却是在第二行显示！！因为liuqiqi的评论太短不足一行，如果显示在第一行，那么第二行就会留下空白，看起来就不那么紧凑了。</p>
<p>另外需要说明的是，插件自带了一个css文件，主要是用来控制翻页按钮的摆放，因为担心一些人对css不太了解，不能将三个按钮很好的摆在一条线上。其它地方都没用css美化，所以需要使用者自行根据自己主题进行些许css设置。</p>
<p><div class="inpostad"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/feedad.gif" /><a href="http://www.qiqiboy.com/bluepaled" title="点击下载bluePaled" target="_blank"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/adtest.png" alt="点击下载bluePaled" /></a></div></p>
<p>下面是对此插件的一些描述：</p>
<blockquote id="p6">
<p><strong>Plugin Name</strong>: WP RC Reply AJAX </p>
<p><strong>Plugin URI</strong>: <a href="http://www.qiqiboy.com/plugins/">http://www.qiqiboy.com/plugins/</a> </p>
<p><strong>Description</strong>: 1. show recent comments at sidebar. 2. with it, you can reply everyone from widget sidebar by Ajax type. </p>
<p><strong>Version</strong>: 1.0.0 </p>
<p><strong>Author</strong>: QiQiBoY </p>
<p><strong>Author URI</strong>: <a href="http://www.qiqiboy.com">http://www.qiqiboy.com</a> </p>
<p><strong>Download:</strong> <a title="http://wordpress.org/extend/plugins/little-wp-to-twitter/" href="http://wordpress.org/extend/plugins/wp-rc-reply-ajax/">http://wordpress.org/extend/plugins/wp-rc-reply-ajax/</a></p>
<hr />
<p><strong>插件名称</strong>：WP RC Reply AJAX （最新评论及侧边栏回复） </p>
<p><strong>插件描述</strong>：显示最新评论以及在侧边栏回复评论 </p>
<p><strong>当前版本</strong>：1.0.0 </p>
<p><strong>插件作者</strong>：QiQiBoY </p>
<p><strong>插件简介</strong>：</p>
<ul>
<li>在侧边栏以小工具形式显示最新评论，支持ajax查看、翻页。 </li>
<li>支持在边栏即时回复评论。（点击一条评论右边的双向箭头，进入单条评论查看模式，然后即可点击右边的回复按钮进行回复操作） </li>
<li>边栏回复支ajax方式提交，无需刷新页面，可连续回复。 </li>
<li>评论提交前可进行简单的错误检测，减少服务器响应消耗。 </li>
<li>边栏回复支持嵌套评论、支持无限级嵌套。 </li>
<li>边栏回复自动添加@回复。 </li>
<li>防重复评论设置，以免评论过快，对一些评论进行重复回复。 </li>
<li><strong><font color="#ff0000">插件下载</font></strong>：<strong><a href="http://wordpress.org/extend/plugins/wp-rc-reply-ajax/" target="_blank">官方目录</a></strong> </li>
</ul>
<p><strong>插件使用</strong>：方法一：直接在后台设置相关选项，然后在添加小工具处向边栏添加“边栏回复小工具”。</p>
<p>方法二：在要显示最新评论的地方（如边栏某个位置或者新建一个页面模板），直接调用</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #008000">/*</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span> <span style="color: #008000"> *输出打印最新评论列表</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span> <span style="color: #008000"> */</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span> &lt;?php wp_rc_reply_echo(<span style="color: #006080">'number=&amp;length=&amp;size=&amp;at='</span>); ?&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span> <span style="color: #008000">/*此函数支持四个可选参数，此处的参数设置会覆盖掉后台的设置。</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span> <span style="color: #008000"> *number是设置评论数量，默认为8；</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span> <span style="color: #008000"> *length是设置评论阶段长度，默认为30；</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span> <span style="color: #008000"> *size是设置头像的尺寸，默认为32；</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span> <span style="color: #008000"> *at是设置自动添加@回复，其值表示从第几层开始加入@回复。默认为0,0表示不添加@回复。</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum12">  12:</span> <span style="color: #008000"> *这四个参数的值都是整数。</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum13">  13:</span> <span style="color: #008000"> *如果不清楚参数含义，请不要盲目添加参数。如你可以直接使用&lt;?php wp_rc_reply_echo(); ?&gt;或&lt;?php wp_rc_reply_echo('number=10&amp;length=25'); ?&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum14">  14:</span> <span style="color: #008000"> *参数是可以省略的，不区分先后位置。</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum15">  15:</span> <span style="color: #008000"> */</span></pre>
<p><!--CRLF--></div>
</p></div>
</p>
<p><strong>更多插件使用信息：请点击<a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html">浏览此文</a></strong></p>
</blockquote>
<p><img style="border-bottom: rgb(170,170,170) 2px solid; border-left: rgb(170,170,170) 2px solid; display: inline; border-top: rgb(170,170,170) 2px solid; border-right: rgb(170,170,170) 2px solid" class="wlDisabledImage sided" title="边栏回复" alt="边栏回复" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/e7eecd6c520f.png" width="274" height="240" /><img style="display: inline" title="screenshot-2" alt="screenshot-2" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/screenshot2.png" width="278" height="204" /> </p>
<p>最后还要赞一下官方的速度，下午四点的时候我插件开发接近尾声，然后向官方提交了插件地址申请，然后在大概晚上九点半的时候便收到了通过邮件，我便立马将插件上传了官方目录。</p>
<p><strong><font color="#9bbb59" size="4">******有觉得好用的同学欢迎在自己博客中推荐一下O(∩_∩)O~********</font></strong></p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/ajax' rel='tag'>ajax</a>, <a href='http://www.qiqiboy.com/tags/plugins' rel='tag'>plugins</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a>, <a href='http://www.qiqiboy.com/tags/wp-rc-reply-ajax' rel='tag'>WP-RC-Reply-AJAX</a>, <a href='http://www.qiqiboy.com/tags/%e6%8f%92%e4%bb%b6' rel='tag'>插件</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/04/01/plugin-little-wp-to-twitter.html" title="插件发布：little wp to twitter">插件发布：little wp to twitter</a> (47)<br /><small>#缓推时间 —— 即当发布日之后，一条更新信息已经同步到twitter，但此后你可能会对日志稍作修改，因为我们很少只点击一次 发布 就完成日志发布的，发布后对日志进行小敲小打是...</small></li><li><a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html" title="仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）">仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）</a> (97)<br /><small>效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓...</small></li><li><a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html" title="【SimPaled篇】Introduce My Blog Theme For You">【SimPaled篇】Introduce My Blog Theme For You</a> (73)<br /><small>  声明：博客顶部仿自微软全球MSN首页(http://www.msn.com)，仅供本人学习研究之用，未用之牟利。 

  此主题支持CMS式首页与普通文章列表式首页风格。CMS首页绝大部分元素采用ajax方式装...</small></li><li><a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html" title="【原理指导篇】无时不在的评论 侧边栏即时回复功能">【原理指导篇】无时不在的评论 侧边栏即时回复功能</a> (24)<br /><small>
这个表单插入到页面上你有两种选择，一是预先在页面上输出一个完整的评论表单，如在footer.php处，注意要在&lt;body&gt;标签闭合前，然后设置display:none，使之在页面上隐藏。二是直接...</small></li><li><a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html" title="【效果测试展示篇】Ajax版即时侧边栏评论回复功能">【效果测试展示篇】Ajax版即时侧边栏评论回复功能</a> (68)<br /><small>自写了《博客加入若干Ajax效果》以来，在博客上陆续添加启用了一些ajax效果，一方面丰富博客体验，一方面也当做练习学习js的一种实践吧。昨天的时候，将wilin版的侧边栏最新评论...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/7m">http://qiqi.boy.im/7m<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年09月3日, <a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comment-5078">Fanr</a>say: 好强大！支持下......原生吧.....原生...</li><li>2010年08月30日, <a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comment-4860">菠萝</a>say: <a href="#comment-4859" rel="nofollow">@liuqiqi </a> 
嗯，我再去看看。</li><li>2010年08月30日, <a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comment-4859">liuqiqi</a>say: <a href="#comment-4858" rel="nofollow">@菠萝</a>
图片上传插件小邪貌似做过呀。。。。。你问问他。。。</li><li>2010年08月30日, <a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comment-4858">菠萝</a>say: <a href="#comment-4586" rel="nofollow">@QiQiBoY </a> 
目前好像使用得不多，但确实是我进我的博客后台，第一个看到这个插件的，居然是你的，厉害!!

对了，QiQi，我有个代码，能不能简单实现以插件的形式插入后台？

或是你能不能开发一个图片上传插件？</li><li>2010年08月29日, <a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comment-4823">david</a>say: 这个好像很方便哦。。支持下。</li><li>2010年08月28日, <a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comment-4780">QiQiBoY</a>say: <a href="#comment-4777" rel="nofollow">@羽中</a>
适当利用，提高访客体验。。</li><li>2010年08月28日, <a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comment-4777">羽中</a>say: 有点意思，话说ajax太多了也不好啊</li><li>2010年08月27日, <a href="http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html#comment-4702">QiQiBoY</a>say: <a href="#comment-4701" rel="nofollow">@静夜燃香 </a> 
 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_twisted.gif' alt=':twisted:' class='wp-smiley' />  。。。</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html/feed</wfw:commentRss>
		<slash:comments>136</slash:comments>
		</item>
		<item>
		<title>仿腾讯微博式访客信息悬浮显示（JavaScript &amp; ajax）</title>
		<link>http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html</link>
		<comments>http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comments</comments>
		<pubDate>Sun, 15 Aug 2010 17:04:00 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[代码]]></category>
		<category><![CDATA[技术]]></category>
		<category><![CDATA[折腾]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/08/17/visitor-information-tencent-suspended-micro-display.html</guid>
		<description><![CDATA[<p><img style="display: inline" class="wlDisabledImage" title="434" alt="434" align="right" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/434.png" width="378" height="206" />效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓名，邮箱和所用的操作系统、浏览器等信息。另外头像下方是评论者所用的邮箱在我博客所发表过的评论的总数。邮箱我将前三位转为*号了，因为隐私的关系。其实这种后期请求过来的数据，是不会被搜索引擎及各种抓取工具捕获的，所以不存在邮箱账号会被采集到，被滥发垃圾邮件的危险，我即使直接显示了也没关系的。</p>]]></description>
			<content:encoded><![CDATA[<p><img style="display: inline" class="wlDisabledImage" title="12" alt="12" align="right" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/123.png" width="240" height="90" />腾讯微博后来居上，据说用户活跃度已超新浪微博。</p>
<p>腾讯微博页有一点很让我喜欢，那就是将鼠标放到用户头像上一会儿，就会在头像上出现一个小的窗口，显示用户的一些资料及其它信息。如右图，这样可以及时方便快速的查看自己及其他人一些相关的信息。</p>
<p>所以我便copy了它的这个功能，整合到了wordpress主题上。</p>
<p><img style="display: inline" class="wlDisabledImage" title="434" alt="434" align="right" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/4341.png" width="378" height="206" />效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓名，邮箱和所用的操作系统、浏览器等信息。另外头像下方是评论者所用的邮箱在我博客所发表过的评论的总数。邮箱我将前三位转为*号了，因为隐私的关系。其实这种后期请求过来的数据，是不会被搜索引擎及各种抓取工具捕获的，所以不存在邮箱账号会被采集到，被滥发垃圾邮件的危险，我即使直接显示了也没关系的。</p>
<p>前台JS处理时还要注意一点，那就是避免重复查询，因为一个页面上可能出现一个用户评论过多次的情况，那么如果鼠标放到这个用户的每条评论的头像上都向服务器发送查询的话，那么就很浪费了。但是，这些访客又没有在博客注册，没有一个唯一的ID能代表其身份。唯一可以证明其身份的就是邮箱了，但是邮箱又不能直接公布，所以我将每个访客的邮箱通过md5加密后的字串的前十位当做这个访客的唯一ID。在对一个访客信息查询后，将这个显示信息div的id标记为访客ID。如果后面再将鼠标放到同一位访客头像上，则会在页面上寻找这个具有唯一id值的信息显示div，如果找到了就直接显示这个div了，不必再次发送查询。其实腾讯微博的做法是在每条微博的<strong>&lt;li&gt;</strong>标签中加入一个具有唯一字串的<strong>rel</strong>属性，每个用户具有唯一的字串。它是通过这个字串来标识不同的用户的。     <br />这个到底该怎么做呢？首先当然是获取页面上每个评论了。然后再对头像上的鼠标移上事件设置动作监听addcard </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> (<span style="color: #0000ff">function</span>(){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span> <span style="color: #008000">//一些打包的简便方法</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span>     <span style="color: #0000ff">function</span> $(id) {<span style="color: #008000">//根据ID获取对象</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span>         <span style="color: #0000ff">return</span> document.getElementById(id)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>     <span style="color: #0000ff">function</span> $$(c, t, p) {<span style="color: #008000">//根据class值获取对象数组</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span>         <span style="color: #0000ff">var</span> at = p.getElementsByTagName(t);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span>         <span style="color: #0000ff">var</span> ms = <span style="color: #0000ff">new</span> Array();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span>         <span style="color: #0000ff">var</span> r = <span style="color: #0000ff">new</span> RegExp(<span style="color: #006080">'(^|\\s)'</span> + c.replace(/\-/g, <span style="color: #006080">'\\-'</span>) + <span style="color: #006080">'(\\s|$)'</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>         <span style="color: #0000ff">var</span> e;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span>         <span style="color: #0000ff">for</span> (<span style="color: #0000ff">var</span> i = 0; i &lt; at.length; i++) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum12">  12:</span>             e = at[i];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum13">  13:</span>             <span style="color: #0000ff">if</span> (r.test(e.className)) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum14">  14:</span>                 ms.push(e)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum15">  15:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum16">  16:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum17">  17:</span>         <span style="color: #0000ff">return</span> ms</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum18">  18:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum19">  19:</span>     <span style="color: #0000ff">function</span> removeNode(obj){<span style="color: #008000">//移除页面某一节点</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum20">  20:</span>         <span style="color: #0000ff">if</span>(typeof obj == <span style="color: #006080">&quot;string&quot;</span>)$(obj).parentNode.removeChild($(obj));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum21">  21:</span>         <span style="color: #0000ff">else</span> obj.parentNode.removeChild(obj);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum22">  22:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum23">  23:</span>     <span style="color: #0000ff">function</span> insertBe(obj,tar){<span style="color: #008000">//在一个节点前插入另一个节点</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum24">  24:</span>         tar.parentNode.insertBefore(obj,tar);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum25">  25:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum26">  26:</span>     <span style="color: #0000ff">function</span> insertAf(obj,tar){<span style="color: #008000">//在一个节点后插入另一个节点</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum27">  27:</span>         tar.parentNode.insertBefore(obj,tar.nextSibling);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum28">  28:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum29">  29:</span>     <span style="color: #0000ff">function</span> addListener(element, name, observer, useCapture) {<span style="color: #008000">//设置监听</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum30">  30:</span>         <span style="color: #0000ff">if</span> (element.addEventListener) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum31">  31:</span>             element.addEventListener(name, observer, useCapture)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum32">  32:</span>         } <span style="color: #0000ff">else</span> <span style="color: #0000ff">if</span> (element.attachEvent) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum33">  33:</span>             element.attachEvent(<span style="color: #006080">'on'</span> + name, observer)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum34">  34:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum35">  35:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum36">  36:</span>     <span style="color: #008000">//</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum37">  37:</span>     <span style="color: #0000ff">var</span> lis = $$(<span style="color: #006080">'comment'</span>, <span style="color: #006080">'li'</span>, $(<span style="color: #006080">'thecomments'</span>));<span style="color: #008000">//取得页面上div#thecomments下具有class=comment的li标签集合li.comment</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum38">  38:</span>     <span style="color: #0000ff">for</span> (<span style="color: #0000ff">var</span> i = 0; i &lt; lis.length; i++) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum39">  39:</span>     (<span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum40">  40:</span>         <span style="color: #0000ff">var</span> id = lis[i].id,it;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum41">  41:</span>         <span style="color: #0000ff">if</span> (/^li-comment\-[0-9]+$/.test(id)) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum42">  42:</span>             <span style="color: #0000ff">var</span> avatar=$$(<span style="color: #006080">'avatar'</span>, <span style="color: #006080">'img'</span>, $(id))[0];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum43">  43:</span>             addListener(avatar,<span style="color: #006080">'mouseover'</span>,<span style="color: #0000ff">function</span>(){addcard(id,it)},<span style="color: #0000ff">false</span>);<span style="color: #008000">//设置监听</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum44">  44:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum45">  45:</span>     })();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum46">  46:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum47">  47:</span> <span style="color: #008000">//...代码未完，继续向下看</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum48">  48:</span> })();</pre>
<p><!--CRLF--></div>
</div>
<p>addcard()具有两个参数，一个是这条评论的id，一个是个定时器。我们就是根据id来发送请求的。接下来是发送请求了。 </p>
<p><div class="inpostad"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/feedad.gif" /><a href="http://www.qiqiboy.com/bluepaled" title="点击下载bluePaled" target="_blank"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/adtest.png" alt="点击下载bluePaled" /></a></div></p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #0000ff">function</span> addcard(id,it){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span>         clearTimeout(it);<span style="color: #008000">//先清除下定时器</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span>         <span style="color: #0000ff">if</span>(document.getElementsByTagName(<span style="color: #006080">'ucard'</span>)||0){<span style="color: #008000">//先将页面上所有未消失的信息显示框都隐藏</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span>             <span style="color: #0000ff">var</span> ucards=$$(<span style="color: #006080">'ucard'</span>,<span style="color: #006080">'div'</span>,$(<span style="color: #006080">'thecomments'</span>));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span>             <span style="color: #0000ff">for</span>(<span style="color: #0000ff">var</span> i=0;i&lt;ucards.length;i++)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>                 <span style="color: #0000ff">if</span>(ucards[i].style.display==<span style="color: #006080">'block'</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span>                     ucards[i].style.display=<span style="color: #006080">'none'</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span>         id=id.replace(<span style="color: #006080">'li-comment-'</span>,<span style="color: #006080">''</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>         <span style="color: #0000ff">var</span> ucard,cardid=$(<span style="color: #006080">'comment-'</span>+id).className;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span>         <span style="color: #0000ff">if</span>($(cardid)||0){<span style="color: #008000">//如果页面上存在具有唯一cardid的div，就直接将它移动到目标位置，设置display，让它显示出来</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum12">  12:</span>             ucard=$(cardid);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum13">  13:</span>             insertBe(ucard,$(<span style="color: #006080">'li-comment-'</span>+id).firstChild);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum14">  14:</span>             ucard.style.display=<span style="color: #006080">&quot;block&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum15">  15:</span>             addListener(ucard,<span style="color: #006080">'mouseout'</span>,<span style="color: #0000ff">function</span>(){delcard(cardid,it)},<span style="color: #0000ff">false</span>);<span style="color: #008000">//设置鼠标移下动作监听</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum16">  16:</span>         }<span style="color: #0000ff">else</span>{</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum17">  17:</span>             ucard=document.createElement(<span style="color: #006080">'div'</span>);ucard.className=<span style="color: #006080">'ucard small'</span>;ucard.style.display=<span style="color: #006080">&quot;block&quot;</span>;ucard.id=cardid;<span style="color: #008000">//将信息框的id值设置为唯一cardid</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum18">  18:</span>             it=setTimeout(<span style="color: #0000ff">function</span>(){<span style="color: #008000">//定时1.5s后发送查询请求</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum19">  19:</span>                 <span style="color: #0000ff">var</span> xmlHttp,url=<span style="color: #006080">'?action=showCard&amp;id='</span>+id;<span style="color: #008000">//创建xmlhttp对象,url的主要参数是id，后台就是根据id从数据库中获取数据返回前台的</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum20">  20:</span>                 try {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum21">  21:</span>                     xmlHttp = <span style="color: #0000ff">new</span> XMLHttpRequest()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum22">  22:</span>                 } catch(e) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum23">  23:</span>                     try {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum24">  24:</span>                         xmlHttp = <span style="color: #0000ff">new</span> ActiveXObject(<span style="color: #006080">&quot;Microsoft.XMLHTTP&quot;</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum25">  25:</span>                     } catch(e) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum26">  26:</span>                         try {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum27">  27:</span>                             xmlHttp = <span style="color: #0000ff">new</span> ActiveXObject(<span style="color: #006080">&quot;Msxml2.XMLHTTP&quot;</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum28">  28:</span>                         } catch(e) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum29">  29:</span>                             alert(<span style="color: #006080">&quot;Your browser does not support ajax!&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum30">  30:</span>                             <span style="color: #0000ff">return</span> <span style="color: #0000ff">false</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum31">  31:</span>                         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum32">  32:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum33">  33:</span>                 }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum34">  34:</span>                 xmlHttp.open(<span style="color: #006080">&quot;GET&quot;</span>, url, <span style="color: #0000ff">true</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum35">  35:</span>                 xmlHttp.setRequestHeader(<span style="color: #006080">&quot;Content-type&quot;</span>, <span style="color: #006080">&quot;charset=UTF-8&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum36">  36:</span>                 xmlHttp.onreadystatechange = <span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum37">  37:</span>                     <span style="color: #0000ff">if</span> (xmlHttp.readyState == 4 || xmlHttp.readyState==<span style="color: #006080">&quot;complete&quot;</span>) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum38">  38:</span>                         <span style="color: #0000ff">if</span> (xmlHttp.status == 200) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum39">  39:</span>                             <span style="color: #0000ff">var</span> data = xmlHttp.responseText;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum40">  40:</span>                             ucard.className=ucard.className.replace(/ small/,<span style="color: #006080">''</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum41">  41:</span>                             ucard.innerHTML=data;<span style="color: #008000">//将数据填入这个div中</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum42">  42:</span>                         } <span style="color: #0000ff">else</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum43">  43:</span>                             removeNode(ucard);<span style="color: #008000">//获取数据失败就移除这个节点</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum44">  44:</span>                         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum45">  45:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum46">  46:</span>                 };</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum47">  47:</span>                 xmlHttp.send(<span style="color: #0000ff">null</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum48">  48:</span>                 insertBe(ucard,$(<span style="color: #006080">'li-comment-'</span>+id).firstChild);<span style="color: #008000">//将节点插入到评论li标签下的第一个节点前面</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum49">  49:</span>                 addListener(ucard,<span style="color: #006080">'mouseout'</span>,<span style="color: #0000ff">function</span>(){delcard(cardid,it)},<span style="color: #0000ff">false</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum50">  50:</span>             },1500);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum51">  51:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum52">  52:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum53">  53:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum54">  54:</span> <span style="color: #0000ff">function</span> delcard(cardid,it){<span style="color: #008000">//使信息框隐藏，这样处理目前有些问题，我换了一种方式，代码很多，下次再说，这里还是用原始方法吧</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum55">  55:</span>     clearTimeout(it);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum56">  56:</span>     it=setTimeout(<span style="color: #0000ff">function</span>(){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum57">  57:</span>         $(cardid).style.display=<span style="color: #006080">&quot;none&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum58">  58:</span>     },3000);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum59">  59:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum60">  60:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum61">  61:</span> addListener($(<span style="color: #006080">'thecomments'</span>),<span style="color: #006080">'click'</span>,<span style="color: #0000ff">function</span>(){<span style="color: #008000">//加上点击评论列表区域就隐藏信息显示框</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum62">  62:</span>     <span style="color: #0000ff">if</span>(document.getElementsByTagName(<span style="color: #006080">'ucard'</span>)||0){</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum63">  63:</span>         <span style="color: #0000ff">var</span> ucards=$$(<span style="color: #006080">'ucard'</span>,<span style="color: #006080">'div'</span>,$(<span style="color: #006080">'thecomments'</span>));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum64">  64:</span>         <span style="color: #0000ff">for</span>(<span style="color: #0000ff">var</span> i=0;i&lt;ucards.length;i++)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum65">  65:</span>             <span style="color: #0000ff">if</span>(ucards[i].style.display==<span style="color: #006080">'block'</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum66">  66:</span>                 ucards[i].style.display=<span style="color: #006080">'none'</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum67">  67:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum68">  68:</span> },<span style="color: #0000ff">false</span>);</pre>
<p><!--CRLF--></div>
</div>
<p>OK，我已经贴出了所有我用到的前端JS代码。上面代码中你已经注意到了<u><strong>cardid=$(&#8217;comment-&#8217;+id).className</strong></u>这一句，这句是获取一个class属性值。有什么用呢？其实这个就是标识唯一访客的ID，我事先在评论列表输出时就给相应的div加上了这个class属性，如下图中的&lt;div id=”comment-4143”…一行。</p>
<p><img style="display: inline" class="wlDisabledImage" title="233" alt="233" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/2331.png" width="355" height="48" /> </p>
<p>这串字符从何而来呢？其实是我修改了评论模板，加上了下面这个 </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> &lt;div id=<span style="color: #006080">&quot;comment-&lt;?php comment_ID(); ?&gt;&quot;</span> <span style="color: #0000ff">class</span>=<span style="color: #006080">&quot;&lt;?php echo substr(md5($comment-&gt;comment_author_email),0,10) ?&gt;&quot;</span>&gt;</pre>
<p><!--CRLF--></div>
</div>
<p>将email加密后截断前十位输出。 </p>
<p>到这里，我觉得该说的都说完了，至于后台，就看你要往前台输出显示什么信息了。其实我想也不会有几个人想要去折腾这个，我给出前台JS代码仅作参考，你可以修改用于其它用途。 </p>
<p></p>
<hr />昨天在书写这篇文章时不小心发出去了，结果<a href="http://immmmm.com/" target="_blank"><strong><u>木木</u></strong></a>和<a href="http://winysky.com" target="_blank"><strong><u>winy</u></strong></a>已经过来抢了沙发，我由于网络问题，删除慢了一拍，等我删完回过头来才在邮箱里看到二人抢沙发的邮件，杯具了。二人的沙发被我收走了。。。 </p>
<p></p>
<p>最后展示一下自我使用wordpress以来所有评论者中评论数最多的人，我没专门去查询过这个，只是在做这个资料显示功能是，按email统计了每个email的评论数，我在前台看了几个人的，发现应该是<a href="http://zww.me" target="_blank"><strong>zwwooooo</strong></a>和<strong><a href="http://www.evlos.org/" target="_blank">小邪</a></strong>的评论最多，位于前两位，到本文发表时分别是<strong>88</strong>条和<strong>76</strong>条。你也可以查看你自己的相关信息，只要<strong><font color="#ff0000">点击自己的头像</font></strong>或者<strong><font color="#ff0000">将鼠标放到自己头像上</font></strong>就行了。当然，一般是展示前三名，但其实第一名是我了，你们查看我的会显示<u>评论：N条</u>，哈哈，评论统计大于100条就不再显示具体条熟了，只显示N条。嗯，都过N的人多了，我再分等级，评论也能升级了。想要显示N条，那就努力评论到100条吧。(下图前两位是评论数最多，后两位是今天被我收走沙发的两位同学O(∩_∩)O~)</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto" class="wlDisabledImage" title="11111" alt="11111" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/11111.png" width="377" height="329" /></p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/ajax' rel='tag'>ajax</a>, <a href='http://www.qiqiboy.com/tags/javascript' rel='tag'>javascript</a>, <a href='http://www.qiqiboy.com/tags/php' rel='tag'>PHP</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a>, <a href='http://www.qiqiboy.com/tags/%e4%bb%a3%e7%a0%81' rel='tag'>代码</a>, <a href='http://www.qiqiboy.com/tags/%e6%8a%80%e6%9c%af' rel='tag'>技术</a>, <a href='http://www.qiqiboy.com/tags/%e6%8a%98%e8%85%be' rel='tag'>折腾</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/07/15/easily-create-your-own-wordpress-quote-reply-function.html" title="添加引用按钮&mdash;&mdash;轻松打造属于你的WordPress引用回复功能">添加引用按钮&mdash;&mdash;轻松打造属于你的WordPress引用回复功能</a> (26)<br /><small>
  之前的《完美解决WordPress嵌套回复的层深问题（无限嵌套）&lt;一&gt;》这篇文章中我讲了自己关于实现WordPress无限嵌套的一个思路。今天又有同学询问引用功能是如何实现的，我就简...</small></li><li><a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html" title="【SimPaled篇】Introduce My Blog Theme For You">【SimPaled篇】Introduce My Blog Theme For You</a> (73)<br /><small>  声明：博客顶部仿自微软全球MSN首页(http://www.msn.com)，仅供本人学习研究之用，未用之牟利。 

  此主题支持CMS式首页与普通文章列表式首页风格。CMS首页绝大部分元素采用ajax方式装...</small></li><li><a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html" title="【原理指导篇】无时不在的评论 侧边栏即时回复功能">【原理指导篇】无时不在的评论 侧边栏即时回复功能</a> (24)<br /><small>
这个表单插入到页面上你有两种选择，一是预先在页面上输出一个完整的评论表单，如在footer.php处，注意要在&lt;body&gt;标签闭合前，然后设置display:none，使之在页面上隐藏。二是直接...</small></li><li><a href="http://www.qiqiboy.com/2010/08/07/effect-of-adding-some-ajax-blog.html" title="博客加入若干Ajax效果">博客加入若干Ajax效果</a> (58)<br /><small>
  

    评论框的简单计数器（无需改动模板，附带输入字数限制功能） 

    添加引用按钮——轻松打造属于你的WordPress引用回复功能 

    wordpress高亮搜索结果+实现关键字前后截断显...</small></li><li><a href="http://www.qiqiboy.com/2010/08/05/added-edit-trackback-style-in-the-code.html" title="补充《修改trackback样式，统一评论外观》中代码">补充《修改trackback样式，统一评论外观》中代码</a> (35)<br /><small>导航：#trackbacks代码&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #代码解释   在《 修改trackback样式，统一评论外观 》中，我只是说了我对trackbacks的样式处理，并没有贴出代码，当然，原...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/7j">http://qiqi.boy.im/7j<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年09月3日, <a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comment-5082">QiQiBoY</a>say: <a href="#comment-5079" rel="nofollow">@Fanr </a> 
 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' /> </li><li>2010年09月3日, <a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comment-5079">Fanr</a>say: 太强大了太强大了！！</li><li>2010年09月3日, <a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comment-5063">QiQiBoY</a>say: <a href="#comment-5062" rel="nofollow">@安庆法律人 </a> 
是的。。。。</li><li>2010年09月3日, <a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comment-5062">安庆法律人</a>say: <a href="#comment-4353" rel="nofollow">@QiQiBoY </a> 
要是没MORE就用不了。</li><li>2010年08月29日, <a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comment-4831">深白色</a>say: 哈哈 看到林木木的頭像被拿來當示範了</li><li>2010年08月29日, <a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comment-4807">yetone</a>say: 这个效果太牛啦</li><li>2010年08月28日, <a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comment-4782">QiQiBoY</a>say: <a href="#comment-4769" rel="nofollow">@joyla</a>
没办法，咱不懂优化。。</li><li>2010年08月28日, <a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html#comment-4769">joyla</a>say: 发现博客显示有点慢！</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html/feed</wfw:commentRss>
		<slash:comments>97</slash:comments>
		</item>
		<item>
		<title>【SimPaled篇】Introduce My Blog Theme For You</title>
		<link>http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html</link>
		<comments>http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comments</comments>
		<pubDate>Sat, 14 Aug 2010 08:40:33 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[bluePaled]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[SimPaled]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[主题]]></category>
		<category><![CDATA[折腾]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html</guid>
		<description><![CDATA[  <p><strong>声明</strong>：博客顶部仿自微软全球MSN首页(http://www.msn.com)，仅供本人学习研究之用，未用之牟利。 </p>

  <p>此主题支持<strong>CMS式首页</strong>与普通<strong>文章列表式首页</strong>风格。CMS首页绝大部分元素采用<strong>ajax方式</strong>装载，随浏览器滚动条向下滚动加载(<strong>Lazyload</strong>)，极大地节省了服务器消耗，也加快了页面载入时间（参考本博首页）。普通<strong>文章列表式首页</strong>采用ajax动态文章加载，实现首页更多文章的展示而不影响页面大小及载入（参考本博blog页面）。 </p><img  align="center" src="http://www.qiqiboy.com/wp-content/themes/SimPaled/screenshot.png" alt="screenshot" title="screenshot"  class=" sided">]]></description>
			<content:encoded><![CDATA[<p>我的习惯是每次开始正式使用一个新主题，就会专门写一篇文章介绍一下，去年12月初使用<a href="http://www.qiqiboy.com/themes#bluepaled" target="_blank"><strong><u>bluePaled</u></strong></a>时我就写了一篇《<a href="http://www.qiqiboy.com/2009/12/16/introduce-my-blog-theme-for-you.html"><strong><font color="#ff0000">Introduce My Blog Theme For You</font></strong></a>》，如今过了大半年，我又换上了新主题<strong><a href="http://www.qiqiboy.com/themes#simpaled" target="_blank"><u>SimPaled</u></a></strong>，所以也例行出一文——【SimPaled篇】Introduce My Blog Theme For You，也算是对这一个月来的折腾总结。以下部分转自主题<a href="http://www.qiqiboy.com/themes/simpaled" target="_blank"><font color="#ccb400">SimPaled的简介页面</font></a><font color="#9bbb59"></font>。</p>
<blockquote><p><strong>声明</strong>：博客顶部仿自微软全球MSN首页(http://www.msn.com)，仅供本人学习研究之用，未用之牟利。 </p>
<p>此主题支持<strong>CMS式首页</strong>与普通<strong>文章列表式首页</strong>风格。CMS首页绝大部分元素采用<strong>ajax方式</strong>装载，随浏览器滚动条向下滚动加载(<strong>Lazyload</strong>)，极大地节省了服务器消耗，也加快了页面载入时间（参考本博首页）。普通<strong>文章列表式首页</strong>采用ajax动态文章加载，实现首页更多文章的展示而不影响页面大小及载入（参考本博blog页面）。 </p>
<ol>
<li>CMS首页的slidershow轮换大图和顶部的“我的作品”中图片也都采用lazyload方式，减少页面下载时大图片请求,从而加快页面文档的装载。 </li>
<li>CMS首页“最新文章”采用AJax技术，实现无刷新翻页，点击“<strong>more</strong>”按钮可以更新此部分文章。 </li>
<li>CMS首页“分类日志”采用lazyload方式，并不随页面初始化装载，而是在浏览器滚动条滚到时才会发出ajax请求装载。每个分类栏目右上角有“more+”按钮，点击可以通过ajax方式实现此分类下文章的翻页浏览。 </li>
<li>博客侧边栏的每个栏目都是采用lazyload方式，随滚动条装载。文章评论也是此方式。 </li>
<li>边栏的最新评论支持翻页浏览、单条评论查看、即时ajax回复等功能。其中最新文章(recent post)部分支持more无限下滚查看。——<font color="#ff0000"><strong>注：</strong></font>边栏回复参考《<a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html"><strong><font color="#ffc000">无时不在的评论 侧边栏即时回复功能</font></strong></a>》 </li>
<li>发表评论部分支持隐藏访客、管理员信息，实时显示gravatar头像，输入字数统计等，文本输入框支持系列编辑器，自由粘贴代码。——<font color="#ff0000"><strong>注：</strong></font>实时头像参考《<a href="http://www.qiqiboy.com/2009/12/30/email-input-box-office-real-time-display-gravatar-picture.html"><font color="#ffc000"><strong>Email输入框处实时显示gravatar头像+email验证+动态信息提醒</strong></font></a>》，编辑器参考《<a href="http://www.qiqiboy.com/2010/07/26/to-comment-box-to-add-text-formatting-editor.html"><font color="#ffc000"><strong>为评论框添加文字格式化编辑器</strong></font></a>》，自由粘贴代码参考《<a href="http://www.qiqiboy.com/2010/07/30/allows-you-to-paste-the-code-in-the-comments-box-free.html"><font color="#ffc000"><strong>让你的评论框自由粘贴代码</strong></font></a>》，字数统计参考《<a href="http://www.qiqiboy.com/2010/07/14/a-simple-comment-box-counter.html"><font color="#ffc000"><strong>评论框的简单计数器（无需改动模板，附带输入字数限制功能）</strong></font></a>》<em></em> </li>
<li>评论支持无限级嵌套，评论引用、回复功能。——<font color="#ff0000"><strong>注：</strong></font>无限嵌套参考《<a href="http://www.qiqiboy.com/2010/07/07/perfect-solution-wordpress-nested-layers-deep-back-problems.html"><font color="#ffc000"><strong>完美解决WordPress嵌套回复的层深问题（无限嵌套）</strong></font></a>》，引用功能参考《<a href="http://www.qiqiboy.com/2010/07/15/easily-create-your-own-wordpress-quote-reply-function.html"><font color="#ffc000"><strong>添加引用按钮——轻松打造属于你的WordPress引用回复功能</strong></font></a>》 </li>
<li>原生JS实现ajax发表评论。发表评论无需刷新页面即可在边栏最新评论处显示。 </li>
<li>评论支持显示文字颜色、大小，图片、音乐等。——<font color="#ff0000"><strong>注：</strong></font>参考《<a href="http://www.qiqiboy.com/2010/07/28/colorful-comments.html" target="_blank"><font color="#ffc000"><strong>让评论可以插入图片，更改文字大小、颜色</strong></font></a>》 </li>
<li>内置搜索支持高亮文字、关键字处截断等。——<font color="#ff0000"><strong>注：</strong></font>参考《<a href="http://www.qiqiboy.com/2010/07/16/wordpress-highlighted-keyword-search-results.html"><strong><font color="#ffc000">wordpress高亮搜索结果+实现关键字前后截断显示。。。</font></strong></a> 》 </li>
<li>联系页面模板、友情链接模板、留言板模板等。。——<font color="#ff0000"><strong>注：</strong></font>邮件联系表单参考《<a href="http://www.qiqiboy.com/2010/07/17/create-a-set-of-built-in-email-contact-form-cookie.html"><strong><font color="#ffc000">创建一个可设置cookie相关信息的内置Email联系表单</font></strong></a>》 </li>
<li>页面智能滑动锚点、内置动画特效类，实现一些动画效果的的简单调用。 </li>
<li>图片自动按比例限制大小，自动链接大图。——<font color="#ff0000"><strong>注：</strong></font>参考《<a href="http://www.qiqiboy.com/2010/07/14/how-do-i-deal-with-the-article-picture.html"><font color="#ffc000"><strong>我是如何处理文章中图片的</strong></font></a>》 </li>
<li>主题不依赖任何插件，不依赖jQuery。 </li>
<li>后台设置支持。 </li>
<li>不支持IE6。不解释。 </li>
</ol>
</blockquote>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/ajax' rel='tag'>ajax</a>, <a href='http://www.qiqiboy.com/tags/bluepaled' rel='tag'>bluePaled</a>, <a href='http://www.qiqiboy.com/tags/javascript' rel='tag'>javascript</a>, <a href='http://www.qiqiboy.com/tags/simpaled' rel='tag'>SimPaled</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a>, <a href='http://www.qiqiboy.com/tags/%e4%b8%bb%e9%a2%98' rel='tag'>主题</a>, <a href='http://www.qiqiboy.com/tags/%e6%8a%98%e8%85%be' rel='tag'>折腾</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html" title="仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）">仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）</a> (97)<br /><small>效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓...</small></li><li><a href="http://www.qiqiboy.com/2010/08/07/effect-of-adding-some-ajax-blog.html" title="博客加入若干Ajax效果">博客加入若干Ajax效果</a> (58)<br /><small>
  

    评论框的简单计数器（无需改动模板，附带输入字数限制功能） 

    添加引用按钮——轻松打造属于你的WordPress引用回复功能 

    wordpress高亮搜索结果+实现关键字前后截断显...</small></li><li><a href="http://www.qiqiboy.com/2009/12/13/something-about-my-theme-bluepaled.html" title="就用这个主题了，不换回老主题了。( ⊙o⊙?)">就用这个主题了，不换回老主题了。( ⊙o⊙?)</a> (39)<br /><small>&#160;&#160;&#160;&#160;&#160; 当我看关了这款色彩鲜艳的主题，再切换回老版本主题时，视觉上的落差让我实在无法接受那灰蒙蒙的界面。虽说可以给它换副搭色，但是我其实是想试试嵌套...</small></li><li><a href="http://www.qiqiboy.com/2009/12/10/the-new-theme-bluepaled.html" title="新主题测试进行时。。。">新主题测试进行时。。。</a> (32)<br /><small>之前来过的同学这次再来肯定会眼前一亮，以前那个灰蒙蒙，有点乱的页面换成了现在蓝色主题（bluePaled）。  我又要纠结了，刚发现百度快照更新到当日了。之前都是一周更新一次，...</small></li><li><a href="http://www.qiqiboy.com/2009/12/07/the-new-wordpress-theme-bluepaled.html" title="纠结的这几天。。。。。。">纠结的这几天。。。。。。</a> (10)<br /><small>这个主题暂定名bluePaled，也许会公开发布，也许我会送给别人私用。但是，这一切都要先等到解决了邮件回复问题后。希望有JavaScript，php方面的高手能与我指导一二。即如何自动给回...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/7f">http://qiqi.boy.im/7f<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年08月31日, <a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comment-4929">QiQiBoY</a>say: <a href="#comment-4927" rel="nofollow">@Ray Chow </a> 
要不lazyload，悲剧的网速下要等更长时间。。。。 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /> </li><li>2010年08月31日, <a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comment-4927">Ray Chow</a>say: 我觉得 LazyLoad 的地方太多了……我们这里悲剧的网速要等一段时间</li><li>2010年08月19日, <a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comment-4376">QiQiBoY</a>say: <a href="#comment-4374" rel="nofollow">@laowi </a> 
呵呵，其实细节处我好多忽略掉的的。。还请多多提意见</li><li>2010年08月19日, <a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comment-4374">laowi</a>say: 看似简单
其实挺精致的
细节做的很好啊</li><li>2010年08月16日, <a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comment-4243">QiQiBoY</a>say: <a href="#comment-4242" rel="nofollow">@underone </a> 
额。。你把鼠标放到上面你的评论的你自己的头像上看一下，是IE7呀。。
恩，window 7系统。。应该是IE8的兼容模式。。</li><li>2010年08月16日, <a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comment-4242">underone</a>say: <a href="#comment-4214" rel="nofollow">@liuqiqi </a> 
不能，只有IE8...</li><li>2010年08月16日, <a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comment-4241">QiQiBoY</a>say: <a href="#comment-4240" rel="nofollow">@MOPVHS </a> 
今天是保存草稿的不小心当发布发布出去了，我没设置预发布，还是我手动发布的。。 <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':smile:' class='wp-smiley' /> </li><li>2010年08月15日, <a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html#comment-4240">MOPVHS</a>say: <a href="#comment-4239" rel="nofollow">@QiQiBoY </a> 原来如此~~~我比较喜欢预发布~~~</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html/feed</wfw:commentRss>
		<slash:comments>73</slash:comments>
		</item>
		<item>
		<title>【原理指导篇】无时不在的评论 侧边栏即时回复功能</title>
		<link>http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html</link>
		<comments>http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comments</comments>
		<pubDate>Fri, 13 Aug 2010 10:07:12 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[评论]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html</guid>
		<description><![CDATA[
<p>这个表单插入到页面上你有两种选择，一是预先在页面上输出一个完整的评论表单，如在footer.php处，注意要在&#60;body&#62;标签闭合前，然后设置display:none，使之在页面上隐藏。二是直接将表单以串形式赋值到一个js变量，点击回复后直接在页面中插入。这两种方法各有各的好，我是使用第二种，这种方法·较第一种更好接受参数。</p>

<p>一个完整的大致的表单如下：</p><img style="display: inline" class="wlDisabledImage" title="边栏回复" alt="边栏回复" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/e7eecd6c520f.png" width="321" height="281" /> ]]></description>
			<content:encoded><![CDATA[<p>在上一篇<a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html">《<strong><u>Ajax版即时侧边栏评论回复功能</u></strong>》中我简单介绍了我最新给博客加入的一个功能，那就是在侧边栏能够即时回复评论。我现在就说一下我的这个功能的一些关键点及相关原理。</a></p>
<h3>1.在评论下插入“回复”按钮</h3>
<p>这个当然是能够直接从后台输出页面时加上最好了。就拿现在最流行的那个带头像最新评论来说，可以在foreach循环输出部分的加入回复按钮。这个按钮包含的动作处理就用“onclick”，所以要在此添加 </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> &lt;a id=<span style="color: #006080">&quot;rc_comment-reply-link&quot;</span> href=<span style="color: #006080">&quot;javascript:void(0)&quot;</span> onclick=<span style="color: #006080">&quot;rc_reply(arg1,arg2(,...))&quot;</span>&gt;回复&lt;/a&gt;</pre>
<p><!--CRLF--></div>
</div>
<p>调用函数rc_reply()中我们要传递进去一些需要的参数，那么需要什么呢？因为点击回复按钮后我们是要在此插入评论的表单，而wordpress的发表评论表单包含用户名（author）、邮箱（email）、网址（url）和评论框（comment），但是除此之外，其实还有两个参数，他们是隐藏的input，分别是评论所在页面ID（comment_post_ID）和嵌套时父级评论ID（comment_parent）。这两个参数是必不可少的，author email url则不是必须的，如要你要实现自动填入cookie中访客相关信息，则可以将这三个也当做参数传递。所以，完整的回复按钮如下 </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> &lt;a id=<span style="color: #006080">&quot;rc_comment-reply-link&quot;</span> href=<span style="color: #006080">&quot;javascript:void(0)&quot;</span> onclick=<span style="color: #006080">&quot;rc_reply('&lt;?php $comment-&gt;comment_ID ?&gt;', '&lt;?php $comment-&gt;comment_post_ID ?&gt;')&quot;</span>&gt;回复&lt;/a&gt;</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<h3>2.点击回复后在评论下插入评论表单</h3>
<p>这个表单插入到页面上你有两种选择，一是预先在页面上输出一个完整的评论表单，如在footer.php处，注意要在&lt;body&gt;标签闭合前，然后设置display:none，使之在页面上隐藏。二是直接将表单以串形式赋值到一个js变量，点击回复后直接在页面中插入。这两种方法各有各的好，我是使用第二种，这种方法·较第一种更好接受参数。</p>
<p>一个完整的大致的表单如下：</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> &lt;div id=<span style="color: #006080">&quot;rc_respond&quot;</span>&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span>     &lt;form id=<span style="color: #006080">&quot;rc_commentform&quot;</span> method=<span style="color: #006080">&quot;post&quot;</span> action=<span style="color: #006080">&quot;http://你的域名/wp-comments-post.php&quot;</span>&gt;<span style="color: #008000">//你的域名最好手写上去，如果使用第一种方法，则可以通过wp的the_bloginfo获取博客地址，使用第二种方法则可用window.location.host等。建议直接写上自己的博客地址</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span>         &lt;p&gt;&lt;input type=<span style="color: #006080">&quot;text&quot;</span> tabindex=<span style="color: #006080">&quot;1&quot;</span> size=<span style="color: #006080">&quot;22&quot;</span> value=<span style="color: #006080">&quot;&quot;</span> id=<span style="color: #006080">&quot;rc_author&quot;</span> name=<span style="color: #006080">&quot;author&quot;</span>&gt;&lt;label <span style="color: #0000ff">for</span>=<span style="color: #006080">&quot;author&quot;</span>&gt;&lt;small&gt;Name&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span>         &lt;p&gt;&lt;input type=<span style="color: #006080">&quot;text&quot;</span> aria-required=<span style="color: #006080">&quot;true&quot;</span> tabindex=<span style="color: #006080">&quot;2&quot;</span> size=<span style="color: #006080">&quot;22&quot;</span> value=<span style="color: #006080">&quot;&quot;</span> id=<span style="color: #006080">&quot;rc_email&quot;</span> name=<span style="color: #006080">&quot;email&quot;</span>&gt;&lt;label <span style="color: #0000ff">for</span>=<span style="color: #006080">&quot;email&quot;</span>&gt;&lt;small&gt;Mail&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span>         &lt;p&gt;&lt;input type=<span style="color: #006080">&quot;text&quot;</span> tabindex=<span style="color: #006080">&quot;3&quot;</span> size=<span style="color: #006080">&quot;22&quot;</span> value=<span style="color: #006080">&quot;'&quot;</span> id=<span style="color: #006080">&quot;rc_url&quot;</span> name=<span style="color: #006080">&quot;url&quot;</span>&gt;&lt;label <span style="color: #0000ff">for</span>=<span style="color: #006080">&quot;url&quot;</span>&gt;&lt;small&gt;Website&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>         &lt;p&gt;&lt;textarea tabindex=<span style="color: #006080">&quot;4&quot;</span> rows=<span style="color: #006080">&quot;5&quot;</span> cols=<span style="color: #006080">&quot;35&quot;</span> id=<span style="color: #006080">&quot;rc_comment&quot;</span> name=<span style="color: #006080">&quot;comment&quot;</span>&gt;&lt;/textarea&gt;&lt;/p&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span>         &lt;p&gt;&lt;input type=<span style="color: #006080">&quot;submit&quot;</span> value=<span style="color: #006080">&quot;Submit&quot;</span> tabindex=<span style="color: #006080">&quot;5&quot;</span> id=<span style="color: #006080">&quot;rc_submit&quot;</span> name=<span style="color: #006080">&quot;submit&quot;</span>&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span>         &lt;input type=<span style="color: #006080">&quot;hidden&quot;</span> id=<span style="color: #006080">&quot;rc_comment_post_ID&quot;</span> value=<span style="color: #006080">&quot;'&quot;</span> name=<span style="color: #006080">&quot;comment_post_ID&quot;</span>&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span>         &lt;input type=<span style="color: #006080">&quot;hidden&quot;</span> value=<span style="color: #006080">&quot;&quot;</span> id=<span style="color: #006080">&quot;rc_comment_parent&quot;</span> name=<span style="color: #006080">&quot;comment_parent&quot;</span>&gt;&lt;/p&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>     &lt;/form&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span> &lt;/div&gt;</pre>
<p><!--CRLF--></div>
</div>
<p>使用第种方法你就将这个表单所在的div#rc_respond加上style=”displaynone“。如果是使用第二种方法，则可以在js中将这个变成字符串形式交给一个变量。</p>
<p><div class="inpostad"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/feedad.gif" /><a href="http://www.qiqiboy.com/bluepaled" title="点击下载bluePaled" target="_blank"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/adtest.png" alt="点击下载bluePaled" /></a></div></p>
<h3>3.相关JS处理部分</h3>
<p>本来想要贴一段代码的，但是后来发现这段代码和具体的页面结构结合很深。由于大家的模板千变万化，所以直接贴出某一具体的代码很可能会误导一些人，所以我就说一下JS里需要处理的部分。首先是要将表单插入到正确的位置，如果你的表单预先输出在页面上，此时就可以使用结点操作将表单移动到需要的位置（如js的appendChild、insertBefore等，以及jQuery的一些结点操作）；如果你的表单还是一窜字符串存在js变量里，则可用innerHTML方式写入到页面的位置上或者是jQuery的html()方法。当然，最重要的是向表单中的comment_post_ID和comment_parent=中填入相关参数，这两个参数值已经是作为函数的参数传递进来了，只需要将值填入即可。</p>
<h3>4.解决嵌套问题</h3>
<p>边栏的最新评论你并不知道是不是最后一层回复了，即使知道，我们也要想办法能够对其进行回复。如果不对嵌套做相关处理，如果是最后一层评论，你即使回复了，也是无效的，仍然会被当做主评论显示。所以我们要知道一条评论目前的所在层深。怎么取得呢？我们可以循环查询数据库中一条评论表中的commet_parent键值，如果不为0，则说明他有父级评论，则再去查询它的父级评论的comment_parent键值，依次循环。</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum1">   1:</span> <span style="color: #008000">//这段代码依然是加在后台foreach循环中</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum2">   2:</span> $comment_depth = 1;<span style="color: #008000">//层深初始化为1</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum3">   3:</span> $tmp_c = $comment;$comment_parent</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum4">   4:</span> <span style="color: #0000ff">while</span>($tmp_c-&gt;comment_parent != 0){<span style="color: #008000">//循环查询</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum5">   5:</span>     $comment_depth++;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum6">   6:</span>     $tmp_c = get_comment($tmp_c-&gt;comment_parent);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum7">   7:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum8">   8:</span> <span style="color: #008000">//关键处，这里依然是用了父级ID替换方法，将对最后一层的回复替换为对倒数第二层的回复</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum9">   9:</span> <span style="color: #0000ff">if</span>($comment_depth &lt; get_option(<span style="color: #006080">'thread_comments_depth'</span>))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: -0.5em 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum10">  10:</span>     $comment_parent=$comment-&gt;comment_ID;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0px; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="padding-bottom: 1px; padding-left: 1px; padding-right: 1px; background: #f4f4f4; color: #606060; margin-left: -1em; padding-top: 1px" id="lnum11">  11:</span> <span style="color: #0000ff">else</span> $comment_parent=get_comment($comment-&gt;comment_parent)-&gt;comment_ID;</pre>
<p><!--CRLF--></div>
</div>
<p>然后你就可以用$comment_parent去替换第一步中的$comment-&gt;comment_ID。<br />
  </p>
<p>做完以上四步，基本上边栏回复的雏形就完成了。当然，此时你回复后点击提交会跳转刷新页面，并不是ajax方式，其实这个也简单，你甚至可以照搬你文章评论处的ajax提交方式，只需改改相关id值即可。</p>
<p>OK，具体中有什么问题还可以留言询问，我尽量解决。</p>
<p>&#160;<img style="display: inline" class="wlDisabledImage" title="边栏回复" alt="边栏回复" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/e7eecd6c520f.png" width="321" height="281" /></p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/ajax' rel='tag'>ajax</a>, <a href='http://www.qiqiboy.com/tags/javascript' rel='tag'>javascript</a>, <a href='http://www.qiqiboy.com/tags/php' rel='tag'>PHP</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a>, <a href='http://www.qiqiboy.com/tags/%e8%af%84%e8%ae%ba' rel='tag'>评论</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html" title="仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）">仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）</a> (97)<br /><small>效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓...</small></li><li><a href="http://www.qiqiboy.com/2010/07/15/easily-create-your-own-wordpress-quote-reply-function.html" title="添加引用按钮&mdash;&mdash;轻松打造属于你的WordPress引用回复功能">添加引用按钮&mdash;&mdash;轻松打造属于你的WordPress引用回复功能</a> (26)<br /><small>
  之前的《完美解决WordPress嵌套回复的层深问题（无限嵌套）&lt;一&gt;》这篇文章中我讲了自己关于实现WordPress无限嵌套的一个思路。今天又有同学询问引用功能是如何实现的，我就简...</small></li><li><a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html" title="【SimPaled篇】Introduce My Blog Theme For You">【SimPaled篇】Introduce My Blog Theme For You</a> (73)<br /><small>  声明：博客顶部仿自微软全球MSN首页(http://www.msn.com)，仅供本人学习研究之用，未用之牟利。 

  此主题支持CMS式首页与普通文章列表式首页风格。CMS首页绝大部分元素采用ajax方式装...</small></li><li><a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html" title="【效果测试展示篇】Ajax版即时侧边栏评论回复功能">【效果测试展示篇】Ajax版即时侧边栏评论回复功能</a> (68)<br /><small>自写了《博客加入若干Ajax效果》以来，在博客上陆续添加启用了一些ajax效果，一方面丰富博客体验，一方面也当做练习学习js的一种实践吧。昨天的时候，将wilin版的侧边栏最新评论...</small></li><li><a href="http://www.qiqiboy.com/2010/08/07/effect-of-adding-some-ajax-blog.html" title="博客加入若干Ajax效果">博客加入若干Ajax效果</a> (58)<br /><small>
  

    评论框的简单计数器（无需改动模板，附带输入字数限制功能） 

    添加引用按钮——轻松打造属于你的WordPress引用回复功能 

    wordpress高亮搜索结果+实现关键字前后截断显...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/76">http://qiqi.boy.im/76<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年08月16日, <a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comment-4244">【SimPaled篇】Introduce My Blog Theme For You - I'm qiqiboy !</a>say: [...] 边栏的最新评论支持翻页浏览、单条评论查看、即时ajax回复等功能。其中最新文章(recent post)部分支持more无限下滚查看。——注：边栏回复参考《无时不在的评论 侧边栏即时回复功能》 [...]</li><li>2010年08月15日, <a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comment-4223">超人</a>say: <a href="#comment-4221" rel="nofollow">@QiQiBoY </a> 
哈哈。。你在ad</li><li>2010年08月15日, <a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comment-4221">QiQiBoY</a>say: <a href="#comment-4218" rel="nofollow">@超人</a>
额。。我试用后觉得很方便的功能。。
有了这个，我回复你这三条不在一个页面的评论，在侧边栏不用翻页就可以全部回复了。。</li><li>2010年08月15日, <a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comment-4218">超人</a>say: 这功能有点奢侈了。。 基本用不上啦~</li><li>2010年08月15日, <a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comment-4207">小邪</a>say: <a href="#comment-4103" rel="nofollow">@liuqiqi </a> 
拖出去切JJ ~  <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' /> </li><li>2010年08月14日, <a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comment-4158">江流</a>say: 这个挺实用的 不过我不折腾了- -</li><li>2010年08月14日, <a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comment-4136">QiQiBoY</a>say: <a href="#comment-4133" rel="nofollow">@Alan </a> 
哈哈，无折腾，不WP。。。</li><li>2010年08月14日, <a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html#comment-4135">QiQiBoY</a>say: <a href="#comment-4132" rel="nofollow">@减肥药 </a> 
你减肥要吃多了？</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html/feed</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>【效果测试展示篇】Ajax版即时侧边栏评论回复功能</title>
		<link>http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html</link>
		<comments>http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comments</comments>
		<pubDate>Tue, 10 Aug 2010 12:35:09 +0000</pubDate>
		<dc:creator>QiQiBoY</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html</guid>
		<description><![CDATA[<p>自写了《<a href="http://www.qiqiboy.com/2010/08/07/effect-of-adding-some-ajax-blog.html" target="_blank"><u>博客加入若干Ajax效果</u></a>》以来，在博客上陆续添加启用了一些ajax效果，一方面丰富博客体验，一方面也当做练习学习js的一种实践吧。昨天的时候，将wilin版的侧边栏最新评论修改成了AJax版的，可以翻看评论列表，也可以进入单个评论查看模式（借鉴了mg12的wp-recentcomment插件），几乎就是wp-rc的精简版，效果几乎一模一样，只不过wp-rc的脚本使用jQuery，更新列表时会有渐变的过渡效果。我自己的只是给加了个自己写的滑动效果，还能凑活。</p>

<p>只不过只是这样并不能满足我，我想既然边栏最新评论列表做成ajax可翻页形式，那么就是为了让读者去查看寻找自己感兴趣的评论，为了增进交流的便利，在侧边栏能直接回复自己感兴趣的评论那会很棒。</p>

<p>于是着手实现了这个效果。</p><img style="display: block; float: none; margin-left: auto; margin-right: auto" class="wlDisabledImage" title="222" alt="222" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/222.png" width="318" height="295" />]]></description>
			<content:encoded><![CDATA[<p>自写了《<a href="http://www.qiqiboy.com/2010/08/07/effect-of-adding-some-ajax-blog.html" target="_blank"><u>博客加入若干Ajax效果</u></a>》以来，在博客上陆续添加启用了一些ajax效果，一方面丰富博客体验，一方面也当做练习学习js的一种实践吧。昨天的时候，将wilin版的侧边栏最新评论修改成了AJax版的，可以翻看评论列表，也可以进入单个评论查看模式（借鉴了mg12的wp-recentcomment插件），几乎就是wp-rc的精简版，效果几乎一模一样，只不过wp-rc的脚本使用jQuery，更新列表时会有渐变的过渡效果。我自己的只是给加了个自己写的滑动效果，还能凑活。</p>
<p>只不过只是这样并不能满足我，我想既然边栏最新评论列表做成ajax可翻页形式，那么就是为了让读者去查看寻找自己感兴趣的评论，为了增进交流的便利，在侧边栏能直接回复自己感兴趣的评论那会很棒。</p>
<p>于是着手实现了这个效果。</p>
<h4>考虑会遇到的的难点</h4>
<p>在页面上插入表单很容易，要注意的一点是要阻止表单提交默认行为，开发过表单提交前验证的应该都知道怎么做。有困难的一点是评论嵌套，因为嵌套的深度有深度，而在边栏显示的评论你并不知道它是不是最后一层了，如果你对嵌套的最后一层评论回复了，那么这条新评论就会被当做主评论显示。我之前写过《<a href="http://www.qiqiboy.com/2010/07/07/perfect-solution-wordpress-nested-layers-deep-back-problems.html"><font color="#ff0000">完美解决WordPress嵌套回复的层深问题（无限嵌套）&lt;一&gt;</font></a>》，看过的应该都知道，我是通过修改js调用脚本中传递的父级评论id值来使回复最后一层的评论在实际上嵌套到倒数第二层，这样就变相的实现了无限嵌套。</p>
<p>所以在解决边栏回复评论功能的嵌套问题是，我也是通过后台查询获取这条评论的嵌套深度，如果它是设置的最大深度了，就返回它的父一级评论的id，这样一来，也就解决了嵌套的问题。</p>
<p>  <div class="inpostad"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/feedad.gif" /><a href="http://www.qiqiboy.com/bluepaled" title="点击下载bluePaled" target="_blank"><img src="http://www.qiqiboy.com/wp-content/themes/bluePaled/img/adtest.png" alt="点击下载bluePaled" /></a></div><br />
<h4>这个功能的优势和局限性</h4>
<p><img style="margin: 0px 21px 0px 8px; display: inline" class="wlDisabledImage" title="11" alt="11" align="left" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/11.png" width="306" height="159" />这个功能会极大地方便访客间的交流，两人之间讨论某一问题，你不必一直在一个页面回复评论，你可以在博客的任何一个页面回复他人。甚至不用刷新页面，你只需要翻看边栏，最新的评论就会即时显示，你可以直接对其进行回复，并且是嵌套回复。</p>
<p>当然，局限性也有，主要是不能回复博主的评论，因为最新评论并不显示博主的评论，所以普通访客就不能及时在侧边栏回复博主了。</p>
<p>&#160;</p>
<p><font style="background-color: #ffff00">有兴趣的可以在边栏回复测试，可以在最新评论处翻看找到一个名叫<strong>liuqiqi</strong>的发表的评论，大家可以对她进行回复测试。<strong>liuqiqi</strong>就下面这人，一个总是第一时间发表“<font color="#ff0000"><strong>美美的沙发。。。</strong></font>”的人。在最新评论处翻到她后，点击蓝色右向双箭头（如下图蓝色圆圈中），进入单条评论查看模式（如上图），再点击“reply”即可进行回复。</font></p>
<p><img style="display: inline" class="wlDisabledImage" title="122" alt="122" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/122.png" width="311" height="47" /></p>
<p>想要取消回复或者回复成功后想要返回，可以点击下图中的back按钮返回最新评论列表。<img style="display: block; float: none; margin-left: auto; margin-right: auto" class="wlDisabledImage" title="222" alt="222" src="http://www.qiqiboy.com/wp-content/uploads/2010/08/222.png" width="318" height="295" /></p>
<p><strong><em>你也不用担心在边栏回复后返回记不清回复过谁了，因为你回复过的人会被记录下来，在刷新页面前，你只能对一个人回复一次。</em></strong></p>
<p><strong><em>另外我的日志下方的评论回复也换上了自己的，功能还很简单，原生JS的。</em></strong></p>
<h4 class="related_post_title"><span class="now">Related Posts</span></h4><div class="tags">More Articles about: <a href='http://www.qiqiboy.com/tags/ajax' rel='tag'>ajax</a>, <a href='http://www.qiqiboy.com/tags/code' rel='tag'>code</a>, <a href='http://www.qiqiboy.com/tags/javascript' rel='tag'>javascript</a>, <a href='http://www.qiqiboy.com/tags/wordpress' rel='tag'>WordPress</a></div><ul class="related_post"><li><a href="http://www.qiqiboy.com/2010/09/06/readers-wall-effect-picture-free-drag.html" title="读者墙效果【二】- 头像自由拖拽">读者墙效果【二】- 头像自由拖拽</a> (46)<br /><small>上一篇博文《我的读者墙展示（附所用JS代码）》中我分享了自己所用的读者墙JavaScript部分代码。其实关于读者墙我还写了一个版本的js效果，不过离我最终的效果还有差距（最终要实...</small></li><li><a href="http://www.qiqiboy.com/2010/09/03/wall-display-of-my-readers-with-js-code-used.html" title="我的读者墙展示（附所用JS代码）">我的读者墙展示（附所用JS代码）</a> (47)<br /><small>好多人都在博客上弄了个读者墙，我之前也搞过，但是换了新主题之后就没再添加了。所以抽了个时间，在links页面加了读者墙，展示的是最近三个月内的评论数量在前72名的访客头像...</small></li><li><a href="http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html" title="仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）">仿腾讯微博式访客信息悬浮显示（JavaScript &#038; ajax）</a> (97)<br /><small>效果如你在我博客评论列表处，你可以直接点击评论者头像，或者将鼠标放到头像上2s，就会出现loading图标，从后台获取数据后就会出现一个长方形框，显示了当前评论者的头像，姓...</small></li><li><a href="http://www.qiqiboy.com/2010/08/14/introduce-my-blog-theme-for-you-2.html" title="【SimPaled篇】Introduce My Blog Theme For You">【SimPaled篇】Introduce My Blog Theme For You</a> (73)<br /><small>  声明：博客顶部仿自微软全球MSN首页(http://www.msn.com)，仅供本人学习研究之用，未用之牟利。 

  此主题支持CMS式首页与普通文章列表式首页风格。CMS首页绝大部分元素采用ajax方式装...</small></li><li><a href="http://www.qiqiboy.com/2010/08/13/ever-present-sidebar-instant-recovery-capabilities-comments.html" title="【原理指导篇】无时不在的评论 侧边栏即时回复功能">【原理指导篇】无时不在的评论 侧边栏即时回复功能</a> (24)<br /><small>
这个表单插入到页面上你有两种选择，一是预先在页面上输出一个完整的评论表单，如在footer.php处，注意要在&lt;body&gt;标签闭合前，然后设置display:none，使之在页面上隐藏。二是直接...</small></li></ul><p><strong>声明:</strong> 本站遵循 <a href="http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/">署名-非商业性使用-相同方式共享 3.0</a> 共享协议. 转载请注明转自 <a href="http://www.qiqiboy.com">I'm qiqiboy !</a> </p> <p>本文地址: <a href="http://qiqi.boy.im/73">http://qiqi.boy.im/73<a></p><span style="background:#cc5566;color:#fffff;"><h4>Look, this post is replyed so hot, let's go O(∩_∩)O~.</h4></span><h3>Related comments</h3><ul><li>2010年08月20日, <a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comment-4401">插件发布：边栏最新评论及ajax回复插件&mdash;&mdash;WP RC Reply AJAX - I'm qiqiboy !</a>say: [...] 之前在《Ajax版即时侧边栏评论回复功能》一文中我已经提到了我的侧边栏回复，我将其稍作改造，做成了今天的这个插件，名字叫WP RC Reply AJAX，全称是wordpress recent comments reply ajax。 [...]</li><li>2010年08月15日, <a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comment-4212">小邪</a>say: <a href="#comment-4026" rel="nofollow">@QiQiBoY </a> 
IE内核浏览器去屎 ~  <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_twisted.gif' alt=':twisted:' class='wp-smiley' /> </li><li>2010年08月13日, <a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comment-4102">【原理指导篇】无时不在的评论 侧边栏即时回复功能 - I'm qiqiboy !</a>say: [...] 在上一篇《Ajax版即时侧边栏评论回复功能》中我简单介绍了我最新给博客加入的一个... [...]</li><li>2010年08月13日, <a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comment-4101">透视眼镜</a>say: 精辟！一语中的 。。</li><li>2010年08月12日, <a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comment-4079">zwwooooo</a>say: <a href="#comment-4074" rel="nofollow">@QiQiBoY </a> 
我在想，能否做个类似的插件，我看很多针对wp后台的插件</li><li>2010年08月12日, <a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comment-4074">QiQiBoY</a>say: <a href="#comment-3990" rel="nofollow">@zwwooooo </a> 
额。。后台翻了半天，我找不到相关功能代码在哪里。。。wp-admin里东西太多。。</li><li>2010年08月12日, <a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comment-4073">QiQiBoY</a>say: <a href="#comment-4071" rel="nofollow">@winy</a>
这个必须有。。。O(∩_∩)O~</li><li>2010年08月12日, <a href="http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html#comment-4072">QiQiBoY</a>say: <a href="#comment-4070" rel="nofollow">@winy </a>  <img src='http://www.qiqiboy.com/wp-includes/images/smilies/icon_exclaim.gif' alt=':!:' class='wp-smiley' />  
额。。我不喜欢页面有东西老跟着飘来飘去。。影响我注意力。。</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.qiqiboy.com/2010/08/10/ajax-version-comment-reply-feature-immediately-sidebar.html/feed</wfw:commentRss>
		<slash:comments>68</slash:comments>
		</item>
	</channel>
</rss>
