![]() |
|
|
Thursday, March 11, 2010 |
|
| 22i DESiGN » WEB DESiGN TiPS » ANTI-SPAM » USING JAVASCRIPT Anti-Spam using JavaScriptUsing JavaScript to present an email address on a webpage is one small way of potentially helping to slow down the proliferation of spam email. This method does not present a straightforward email address in the code of the webpage, but uses the javascript to build and display an email address from seperate elements when the page is displayed in the browser window. As with all anti-spam tips, you may wish to use this in conjunction with other anti-spam methods to create numerous "hurdles" to guard against unwanted email. OK. Between the <head></head> tags in your webpage paste the following piece of javascript <script type="text/javascript" language="JavaScript">What this script does is set up the variables, user, domain and suffix. The actual function is called antispam and when it is called it writes an email address using the variables you define in the call. Here is the call... <script type="text/javascript" language="JavaScript">Place the call in the page where the email adress would normally be. Which would display a live link to the email address info@yourdomainname.com If you wish to display multiple email addresses on a page, just use a new call for each email address and re-define the variables accordingly. |
|