Get Smarty

Donate

Paypal

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Advertisement

混淆电子邮件地址

你会不会惊讶为什么你的邮件地址会收到那么多的垃圾邮件? 其中一个原因是垃圾邮件发送者们的程序可以在页面上收集你的邮件地址。 要对抗这些程序,你可以通过javascript在HTML代码里面混淆你的邮件地址, 而且在浏览器里面看的时候是正常的。 你可以通过 {mailto}函数来进行这样的处理。

Example 21.8. 混淆电邮地址的例子


<div id="contact">Send inquiries to
{mailto address=$EmailAddress encode='javascript' subject='Hello'}
</div>

    

技术说明

这个方法并非可以100%可行。邮件地址收集器可以修改收集程序来解码这些值,或许吧...希望...这需要量子计算机:-?

参见 escape修饰器和 {mailto}.

Comments
No comments for this page.

Advertisement

Sponsors [info]

Sponsors