9 ms·
I use similar approach, and yes, it works fine as long as spammers don't figure how to extract your email address from JavaScript code. function em(e2, e1) {
by mojuba 19y ago
I use similar approach, and yes, it works fine as long as spammers don't figure how to extract your email address from JavaScript code.
function em(e2, e1)
{
return 'mailto:' + e1 + '@' + e2 + '.com';
}
... and somewhere in your HTML code:
onClick="this.href=em('foobar', 'contact')"
The name of the function may be more cryptic and I just thought it may be even dynamic (random), as well as the order of arguments.