Use javascript to protect email addresses
From Attie's Wiki
(Difference between revisions)
Line 20: | Line 20: | ||
var b = "attie.co.uk"; | var b = "attie.co.uk"; | ||
− | document.write( | + | document.write('<a href="'+y+z+':'+a+x+b+'">Contact</a>'); |
</script> | </script> | ||
Revision as of 19:31, 10 March 2010
<html> <head> <title>Test</title> </head> <body> <div> <!-- You will need to change variables a and b to be the a@b of the email address. Copy between these comments into your page. --> <script> var x = "@"; var y = "mai"; var z = "lto"; var a = "attie"; var b = "attie.co.uk"; document.write('<a href="'+y+z+':'+a+x+b+'">Contact</a>'); </script> <!-- End copy --> </html>