Posted By

Bluewall on 02/27/09


Tagged

email spam


Versions (?)

Obscure Email Script


 / Published in: JavaScript
 

URL: http://www.bluewallllc.com

This script stores the elements of the email address as JavaScript variables and assembles them on the fly every time the page loads. The page rendered looks the same to users, but the address never actually lives in the page source code. It can be inserted inline.

  1. <script language=javascript><!--
  2. var email = "kermitthefrog";
  3. var emailHost = "gmail.com";
  4. document.write(email + '@' + emailHost);
  5. //--></script>
  6.  
  7. If JavaScript is not working, the visitor will see nothing, though. This
  8. will take care of that:
  9.  
  10. <span id="kermit-email">kermitthefrog -at- gmail -dot- com</span>
  11. <script language=javascript><!--
  12. var email = "kermitthefrog";
  13. var emailHost = "gmail.com";
  14. document.getElementById('kermit-email').innerHTML = email + '@' +
  15. emailHost;
  16. //--></script>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Unreal on March 1, 2009

Im sorry, but I dont see the point of this lol.

Posted By: mahalie on June 18, 2009

Are you joking? Spam-protecting email addresses is web dev 101. If there's a reason this won't work or doesn't make sense I'd like to know why...specifically.

You need to login to post a comment.