T
Trevor L.
MVPS Website: http://trevorl.mvps.org/
Yes,
For example, you can set up a function sendEMail which calls myEmail().
Because the name and domain inside myEmail() are not in one string, they are
not recognised by spammers. You can use myEmail() anywhere in a JavaScript
function where you need this Email address to appear
Alter the contents of
userTo
domainTo
domainext
as required
Similarly, sendEMail() can be amended as required,
e.g.
subject
body
function myEmail()
{
var userTo = 'myname'
var domainTo = 'mydomain'
var domainext = '.com'
return userTo + '@' + domainTo + domainext
}
function sendEMail()
{
var text = 'Email Us'
var subject = 'Response from My Home Page'
var body = 'Please enter message here'
document.write
( '<a href="mailto:' + myEmail()
+ '?subject=' + subject
+ '&body=' + body + '">'
+ text + '</a>' )
}
Yes,
For example, you can set up a function sendEMail which calls myEmail().
Because the name and domain inside myEmail() are not in one string, they are
not recognised by spammers. You can use myEmail() anywhere in a JavaScript
function where you need this Email address to appear
Alter the contents of
userTo
domainTo
domainext
as required
Similarly, sendEMail() can be amended as required,
e.g.
subject
body
function myEmail()
{
var userTo = 'myname'
var domainTo = 'mydomain'
var domainext = '.com'
return userTo + '@' + domainTo + domainext
}
function sendEMail()
{
var text = 'Email Us'
var subject = 'Response from My Home Page'
var body = 'Please enter message here'
document.write
( '<a href="mailto:' + myEmail()
+ '?subject=' + subject
+ '&body=' + body + '">'
+ text + '</a>' )
}