Email cloaking code


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.