Posted By

dkevey on 11/10/10


Tagged

email spam protection cloaking


Versions (?)

Email cloaking code


 / Published in: JavaScript
 

  1. // this goes in the head section
  2. <script type="text/javascript">
  3. <!--
  4. function writeEmail(arg1, arg2, arg3, arg4) {
  5. var em = "<a href='mailto:" + arg1 + arg2 + arg3 + "?subject=" + arg4 + "'>" + arg1 + arg2 + arg3 + "</a>";
  6. //alert (em);
  7. document.write(em);}
  8. -->
  9. </script>
  10.  
  11. // this goes in the body section
  12. <script type="text/javascript">
  13. <!--
  14. writeEmail("some", "email@gm", "ail.com", "some email enquiry from website");
  15. -->
  16. </script>

Report this snippet  

You need to login to post a comment.