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

<channel>
	<title>甜·咖啡&#187; Email</title>
	<atom:link href="http://blog.xiao3.info/tag/email/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.xiao3.info</link>
	<description>Software  Wordpress  &#124;&#124;  ProE  SolidWorks</description>
	<lastBuildDate>Sun, 22 Aug 2010 03:00:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>隐藏真实的邮箱地址</title>
		<link>http://blog.xiao3.info/hide-real-email-address.html</link>
		<comments>http://blog.xiao3.info/hide-real-email-address.html#comments</comments>
		<pubDate>Fri, 04 Sep 2009 05:00:30 +0000</pubDate>
		<dc:creator>xiao3</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://blog.xiao3.info/?p=60</guid>
		<description><![CDATA[一般我们在网站上都要贴出自己的邮箱地址，而普遍的方法是用特殊标记代替或者是使用图片格式的地址，今天这里要介绍的是采用代码的方式来显示你的真实邮箱地址，代码不多，比较适合那些 不折腾会死星 人来使用……

首先我们先将下面的这段代码保存为一个 JS 文件，名字可以自己取，比如 email-protection.js ，方便自己记住。
JavaScript语言: 邮件保护代码
 $(document).ready(function() { $(&#34;.email&#34;).click(function() &#160;&#160;&#160; { &#160;&#160;&#160; var A=&#34;mengzehe&#34; &#160;&#160;&#160; var B=&#34;gmail.com&#34; &#160;&#160;&#160; var C=A+&#34;@&#34;+B; $(this).parent().append(&#34;&#60;img src=&#39;http://xiao3.info/image/loading.gif&#39; /&#62;&#34;); $(this).hide(); &#160;&#160;&#160; setTimeout(function() &#160;&#160;&#160;&#160;&#160;&#160;&#160; { &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var D=$(&#34;.email&#34;); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D.next().hide(); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D.text(C); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D.attr(&#34;href&#34;,&#34;mailto:&#34;+C).unbind(&#34;click&#34;); &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; D.fadeIn(1000) &#160;&#160;&#160;&#160;&#160;&#160;&#160; },3000) &#160;&#160;&#160; }) })
其中， http://xiao3.info/image/loading.gif 这个图片是为了让人觉得有一个等待的时间，说白了就是忽悠人的！大家只要将上面代码里面的 “mengzehe” 和 “gmail.com” 换成你的邮箱地址的相应部分就可以啦！
然后再将这个 JS 文件上传到你的博客空间，记住好这个文件的地址，这个时候我们在要添加邮箱地址的页面（比如我的 About [...]]]></description>
			<content:encoded><![CDATA[<p style="text-indent:2em" >一般我们在网站上都要贴出自己的邮箱地址，而普遍的方法是用特殊标记代替或者是使用图片格式的地址，今天这里要介绍的是采用代码的方式来显示你的真实邮箱地址，代码不多，比较适合那些 不折腾会死星 人来使用……</p>
<p><span id="more-60"></span></p>
<p style="text-indent:2em" >首先我们先将下面的这段代码保存为一个 JS 文件，名字可以自己取，比如 email-protection.js ，方便自己记住。</p>
<div style="background: rgb(253, 253, 253) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: black;"><u>JavaScript语言</u>: <a href="http://fayaa.com/code/view/5567/">邮件保护代码</a></div>
<div style="font-family: &quot;Fixedsys&quot;,&quot;Consolas&quot;,&quot;Lucida Console&quot;,&quot;Courier New&quot;; color: rgb(0, 0, 0); background-color: rgb(249, 247, 237);" class="source"> <span style="color: rgb(0, 0, 0);">$</span>(<span style="color: rgb(0, 0, 0);">document</span><span style="color: rgb(0, 0, 0);">).</span><span style="color: rgb(0, 0, 0);">ready</span>(<span style="color: rgb(0, 0, 255);">function</span>()<br /> <span style="color: rgb(0, 0, 0);">{</span><br /> <span style="color: rgb(0, 0, 0);">$</span>(<span style="color: rgb(163, 21, 21);">&quot;.email&quot;</span><span style="color: rgb(0, 0, 0);">).</span><span style="color: rgb(0, 0, 0);">click</span>(<span style="color: rgb(0, 0, 255);">function</span>()<br /> &nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">{</span><br /> &nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 255);">var</span> <span style="color: rgb(0, 0, 0);">A</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(163, 21, 21);">&quot;mengzehe&quot;</span><br /> &nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 255);">var</span> B<span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(163, 21, 21);">&quot;gmail.com&quot;</span><br /> &nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 255);">var</span> <span style="color: rgb(0, 0, 0);">C</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">A</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(163, 21, 21);">&quot;@&quot;</span><span style="color: rgb(0, 0, 0);">+</span>B;<br /> <span style="color: rgb(0, 0, 0);">$</span>(<span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">).</span><span style="color: rgb(0, 0, 0);">parent</span><span style="color: rgb(0, 0, 0);">().</span><span style="color: rgb(0, 0, 0);">append</span>(<span style="color: rgb(163, 21, 21);">&quot;&lt;img src=&#39;http://xiao3.info/image/loading.gif&#39; /&gt;&quot;</span>);<br /> <span style="color: rgb(0, 0, 0);">$</span>(<span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">).</span><span style="color: rgb(0, 0, 0);">hide</span>();<br /> &nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">setTimeout</span>(<span style="color: rgb(0, 0, 255);">function</span>()<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">{</span><br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 255);">var</span> <span style="color: rgb(0, 0, 0);">D</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">$</span>(<span style="color: rgb(163, 21, 21);">&quot;.email&quot;</span>);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">D</span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(0, 0, 0);">next</span><span style="color: rgb(0, 0, 0);">().</span><span style="color: rgb(0, 0, 0);">hide</span>();<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">D</span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(0, 0, 0);">text</span>(<span style="color: rgb(0, 0, 0);">C</span>);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">D</span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(0, 0, 0);">attr</span>(<span style="color: rgb(163, 21, 21);">&quot;href&quot;</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(163, 21, 21);">&quot;mailto:&quot;</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">C</span><span style="color: rgb(0, 0, 0);">).</span><span style="color: rgb(0, 0, 0);">unbind</span>(<span style="color: rgb(163, 21, 21);">&quot;click&quot;</span>);<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">D</span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(0, 0, 0);">fadeIn</span>(<span style="color: rgb(0, 0, 0);">1000</span>)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">}</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);">3000</span>)<br /> &nbsp;&nbsp;&nbsp; <span style="color: rgb(0, 0, 0);">})</span><br /> <span style="color: rgb(0, 0, 0);">})</span></div>
<p style="text-indent:2em" >其中， http://xiao3.info/image/loading.gif 这个图片是为了让人觉得有一个等待的时间，说白了就是忽悠人的！大家只要将上面代码里面的 “mengzehe” 和 “gmail.com” 换成你的邮箱地址的相应部分就可以啦！</p>
<p style="text-indent:2em" >然后再将这个 JS 文件上传到你的博客空间，记住好这个文件的地址，这个时候我们在要添加邮箱地址的页面（比如我的 <a href="http://blog.xiao3.info/about">About</a> 页面），在写内容的时候将下面这句代码加进来：</p>
<div style="font-family: &quot;Fixedsys&quot;,&quot;Consolas&quot;,&quot;Lucida Console&quot;,&quot;Courier New&quot;; color: rgb(0, 0, 0); background-color: rgb(249, 247, 237);" class="source"> <span style="color: rgb(0, 0, 0);">&lt;</span><span style="color: rgb(0, 0, 0);">script</span> <span style="color: rgb(0, 0, 0);">type</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(163, 21, 21);">&quot;text/javascript&quot;</span> <span style="color: rgb(0, 0, 0);">src</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(163, 21, 21);">&quot;http://xiao3.info/js/email-protection.js&quot;</span><span style="color: rgb(0, 0, 0);">&gt;&lt;/</span><span style="color: rgb(0, 0, 0);">script</span><span style="color: rgb(0, 0, 0);">&gt;</span></div>
<p style="text-indent:2em" >最后再加上这段代码就可以将你的 Email 地址真正的隐藏起来啦！</p>
<div style="font-family: &quot;Fixedsys&quot;,&quot;Consolas&quot;,&quot;Lucida Console&quot;,&quot;Courier New&quot;; color: rgb(0, 0, 0); background-color: rgb(249, 247, 237);" class="source"> <span style="color: rgb(0, 0, 0);">&lt;b</span> <span style="color: rgb(0, 0, 0);">style=</span><span style="color: rgb(163, 21, 21);">&quot;color:#F00&quot;</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);">Gmail</span><span style="color: rgb(0, 0, 0);">&lt;/b&gt;&lt;b</span> <span style="color: rgb(0, 0, 0);">style=</span><span style="color: rgb(163, 21, 21);">&quot;color:#060&quot;</span><span style="color: rgb(0, 0, 0);">&gt;</span> <span style="border: 1px solid rgb(255, 0, 0);">&amp;</span> <span style="color: rgb(0, 0, 0);">&lt;/b&gt;&lt;b</span> <span style="color: rgb(0, 0, 0);">style=</span><span style="color: rgb(163, 21, 21);">&quot;color:#00F&quot;</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);">Gtalk</span><span style="color: rgb(0, 0, 0);">&lt;/b&gt;</span><span style="color: rgb(0, 0, 0);">：</span><span style="color: rgb(0, 0, 0);">&lt;a</span> <span style="color: rgb(0, 0, 0);">href=</span><span style="color: rgb(163, 21, 21);">&quot;javascript:void(0)&quot;</span> <span style="color: rgb(0, 0, 0);">class=</span><span style="color: rgb(163, 21, 21);">&quot;email&quot;</span><span style="color: rgb(0, 0, 0);">&gt;</span><span style="color: rgb(0, 0, 0);">点击查看</span><span style="color: rgb(0, 0, 0);">&lt;/a&gt;</span></div>
<p style="text-indent:2em" >具体的效果，大家可以看我的 <a href="http://blog.xiao3.info/about">About</a> 页面。</p>
<P><div style="margin:3px 5px 2px 0px;float:left;"><A HREF="http://catfun.info" target="_blank">
<IMG SRC="http://xiao3meng.googlecode.com/files/cat.gif" BORDER="0"  ALT="咪咪集散地">
</A></div><A HREF="http://feeds.feedburner.com/mengzehe/CatFun" target="_blank">
<IMG SRC="http://feeds.feedburner.com/mengzehe/CatFun.gif?w=1&c=1&bb=s4Kh" BORDER="0"  ALT="咪咪集散地">
</A>
<br/>
<hr noshade style="margin:0;height:1px" /></br>
<p> <strong>©</strong> xiao3 for <a href="http://blog.xiao3.info">甜·咖啡</a>, 2009. |
<a href="http://blog.xiao3.info/hide-real-email-address.html">链接</a> |
<a href="http://blog.xiao3.info/hide-real-email-address.html#comments">评论(5)</a> |
<a href="https://twitter.com/mengzehe" title="欢迎在 Twitter 上 Follow 我!" style="font-weight:700;color:#33ccff;background-color:#fff;">Twitter</a>
 | <a title="实时更新可用的 GHS.google.com 的 IP " href="http://www.xiao3.info/ghs-ip.php" style="color:#FF6600;" target="_blank">GHS IP</a> | <a title="有了它，伟大的墙要倒下啦！"  href="https://xiao3proxy.appspot.com/" style="color:#FF0000;">代理</a> 
| <a title="本站一些小文件都在这里" href="http://mengzehe-app.appspot.com/" style="color:#666600;">文件</a> 
| <a title="你想翻墙么？看这里" href="http://proxy.xiao3.info/" style="color:#AA6600;">FUCK GFW</a>
<br/>
<br/>
<br/>
原文地址：<a href="http://blog.xiao3.info/hide-real-email-address.html">隐藏真实的邮箱地址</a>          标签: <a href="http://blog.xiao3.info/tag/email" rel="tag">Email</a>, <a href="http://blog.xiao3.info/tag/js" rel="tag">js</a><br/>
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.xiao3.info/hide-real-email-address.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
