HTML 带有“&”的邮件主题
HTML mailto subject with '&'
我需要根据客户端的“&”符号进行设置 html。
我有以下代码,
<a href="mailto:no-one@snai1mai1.com?subject=free chocolate&Body=get free hurry.">example</a>
我需要设置电子邮件主题:free chocolate & cake
怎么做?
您需要URL对文本进行编码;所以它变成:
<a href="mailto:no-one@snai1mai1.com?subject=free chocolate %26 cake&Body=get free hurry.">example
</a>
%26
是 &
的 Url 编码表示
我需要根据客户端的“&”符号进行设置 html。 我有以下代码,
<a href="mailto:no-one@snai1mai1.com?subject=free chocolate&Body=get free hurry.">example</a>
我需要设置电子邮件主题:free chocolate & cake
怎么做?
您需要URL对文本进行编码;所以它变成:
<a href="mailto:no-one@snai1mai1.com?subject=free chocolate %26 cake&Body=get free hurry.">example
</a>
%26
是 &