share your email address, but hide it from spammers

Type the following code in your “contact” page or wherever you want your contact information to appear on your website:

htmlcodeforjavaemailaddress

Copy the code below, paste it in a text file and edit the content in red:
(You can use any text editor, like the Notepad app in Windows.)

<!– Begin

// NOTE: If you use a ‘ add a slash before it like this \’
// NOTE: to turn any code into a comment, type two forward slashes //
in front of the line of code
// NOTE: I left the css code in, but you would need to create it in your own style sheet

document.write(‘<span class=”phonetitle”><nobr>’);

document.write(‘Your Name Here‘);

document.write(‘</nobr></span><br>’);

document.write(‘10901 Your Street<br>’);

document.write(‘City, ST 12345<br>’);

document.write(‘PHONE: <span class=”phonetitle”>(555) 555-5555<BR></span>’);

//document.write(‘<br>’);

document.write(‘EMAIL: <A HREF=”mailto:yourown@emailaddress.com” class=”link”>yourown@emailaddress.com</a><br>’);

//  End –>

Name the text file “phone.js” and save it in the same folder as the file containing the first code.

Now, your email isn’t underlying text that’s easily found by scammers and spammers, it’s buried in code. The downside is that anyone who’s not running javascript can’t see your content – rare, but possible.

Caveat: If your website is hosted on WordPress.com, they don’t allow javascript, so this code won’t work for your site.

(code snippet credit allwebcodesign.com)