m0atz m0atz - 9 months ago 58
HTML Question

Safe way to display email address and contact number

Are there any tips to display a contact telephone number and email on a contact form webpage? I have a contact form on the page, but also want to give people the option of being able to call or email directly. Currently they are displayed in plain text but feel this is insecure and open to bots crawling the site for this kind of info.

Is there a safe way to do it?


Answer Source

Here is one way to do it using Javascript:

<script language=JavaScript type="text/javascript">
var user = "yourname";
var host = "yourdomain.com";
var link = user + "@" + host;
document.write("<a hre" + "f=mai" + "lto:" + user + "@" + host + "><b>" + link + "</b></a>");
--> </script>