I want to open a new outlook mail template with the 'To address' whenever a user clicks an image. I have return my code in a html page(linked with the image), whenever it loads the javascript should open a new mail template. But the functionality is not working. Kindly let me know what is wrong in my code.
body onLoad="redirect()"
script language="JavaScript"
function redirect()
var email = "[email protected]"
var mailto_link = 'mailto:' + email
window = window.open(mailto_link, 'emailWindow')
if (window && window.open && !window.closed)
window.close()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…