Embed print link with in html email?

2020-04-16 04:43发布

问题:

i am trying to embed a print link with in an html email blast.

i have tried following code but it does not work.

<a href="javascript:window.print();">
<img src="reward_08.gif" border="0"  width="71" height="52" alt="PRINT">
</a>

Above code works fine when i do it within a webpage.

Any suggestions?

回答1:

Like the comments, since email clients don't generally support javascript. You can have a button/text link to an external page that is a copy of the email and change the <body> tag to this

<body onload="window.print()">