微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

No Spam normallowDefault (no options)Replacing textFilter level lowNon-link elementMultiple dots (.), Filter Level low

程序名称:No Spam normallowDefault (no options)Replacing textFilter level lowNon-link elementMultiple dots (.), Filter Level low

授权协议: 未知

操作系统: 未知

开发语言:

No Spam normallowDefault (no options)Replacing textFilter level lowNon-link elementMultiple dots (.), Filter Level low 介绍

Description

This jQuery plugin turns an obfuscated e-mail address into a human-readable
one. It’s lightweight and accepts multiple filtering levels for additional
security. No Spam works on mailto links and other HTML elements, automatically
detecting which you’re applying it to.

Filter Levels

No Spam has two filter levels that determine how your e-mail address should be
formatted when it’s passed in: low and normal (default).

normal

normal looks for a reversed email address with the at sign (@) to be
replaced with two forward slashes (//) and periods (.) to be replaced with
single slashes (/). reversing it provides an extra level of protection.
Example: [email protected] should be passed as

moc/elpmaxe//liame

@H_404_26@

low

low looks for an email address with the at sign (@) to be replaced with two
forward slashes (//) and periods (.) to be replaced with single slashes (/).
The only difference between low and normal is that low does not require the
e-mail to be reversed. This method is still effective and is also more natural
to read and type, but still tricky for a bot to untangle. Example:
[email protected] should be passed as

email//example/com

@H_404_26@

Usage

Default (no options)

$('a.email').nospam();

<a href="#" rel="moc/elpmaxe//liame" class="email">Email Me!</a> would
become Email Me!

Replacing text

$('a.email').nospam({ replaceText: true });

<a href="#" rel="moc/elpmaxe//liame" class="email">Email Me!</a> would
become [email protected]

Filter level low

$('a.email').nospam({ filterLevel: 'low' });

<a href="#" rel="email//example/com" class="email">Email Me!</a> would
become [email protected]

Non-link element

$('span.email').nospam(); // always replaces text when not a link

<span>moc/elpmaxe//liame</span> would become
[email protected]

Multiple dots (.), Filter Level low

$('span.email').nospam({ filterLevel: 'low' });

<span>firstname/lastname//example/co/uk</span> would become
[email protected]

Integration

I created a PHP companion function to No Spam that allows you to wrap an
e-mail address in a PHP function that will automatically format it for use
with No Spam so you don’t have to manually change anything! More details here
http://www.leftrightdesigns.com/library/jquery/nospam/php-
integration.ph…

No Spam normallowDefault (no options)Replacing textFilter level lowNon-link elementMultiple dots (.), Filter Level low 官网

http://plugins.jquery.com/project/nospam

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐