这是我当前的代码:
<td height="150" style="background: url(bg.jpg); cursor: pointer;" onClick="document.location.href='http://www.youtube.com';">
显然,对于 JavaScript,这不太可能在电子邮件客户端中起作用(是吗?)。什么是 HTML 解决方案?提前致谢!我试过将链接标签包裹起来,但这似乎没有用。
最佳答案
为什么不直接设置链接的样式以占用 td 的宽度和高度:
<td height="150" style="background: url(bg.jpg);"><a href="http://www.youtube.com" style="display:block;height:150px;width:100%;"></a></td>
关于javascript - HTML 电子邮件模板解决方案到 table TD 中的 javascript 链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17783987/