Posted By

Hirmine on 12/06/06


Tagged

email antispam anti harvesters protect


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

Hirmine
pedro
tavo
vali29


Codificar el email con Javascript contra el spam.


 / Published in: JavaScript
 

URL: http://www.pixelydixel.com/2003/11/escondiendo-el-email.html

Evitar que en el código de la página se pueda ver “[email protected]”.

  1. <script type = "text/javascript"><!
  2. document.write(<a href = "mailto:’ + ‘micorrreo@’ + ‘midominio.com?subject
  3. = titulo’ + ‘">+ ‘enlace email’ +</a>);
  4. // –>
  5. </script>
  6.  
  7. O también, mostrando la dirección:
  8.  
  9. <script language="JavaScript">
  10. <!– Begin
  11. user = "midireccion";
  12. site = "midominio.com";
  13. document.write(<a href=\"mailto:’ + user + ‘@’ + site + ‘\">’);
  14. document.write(user + ‘@’ + site + ‘</a>’);
  15. // End –>
  16. </script>

Report this snippet  

You need to login to post a comment.