简体   繁体   English

如何在电子邮件模板中添加按钮

[英]How to add button in email template

I want to add a button in email template and want to call a method based on that button click. 我想在电子邮件模板中添加一个按钮,并希望基于该按钮单击来调用方法。

can anyone suggest me how can i do this? 谁能建议我该怎么做?

Thanx in advance. 提前感谢。

In html email, you are limited to html and css, so the only button you can create is a hyperlink. 在html电子邮件中,您只能使用html和css,因此可以创建的唯一按钮是超链接。 You could however pass some url parameters to a web page that does all your dirty work for you. 但是,您可以将一些url参数传递到一个网页,该网页可以为您完成所有的工作。

The design options are: 设计选项为:

  • An image wrapped in a href <a href=""><img src=""></a> 包裹在href <a href=""><img src=""></a>
  • Full CSS button - by building it in CSS so that it shows with images turned off. 完整的CSS按钮-通过在CSS中进行构建,使其在关闭图像的情况下显示。
  • "Bulletproof Buttons" - using a combination of CSS and background images. “防弹按钮”-使用CSS和背景图像的组合。 They fallback to the css if the images are turned off. 如果图像关闭,它们将退回到CSS。 See buttons.cm for a great example 参见buttons.cm示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM