如何在html mailto中添加换行符?
我试过%0D%0A它工作正常但是如果我用android浏览器尝试上面的代码它会显示原样。同样在chrome android中,空格被替换为+。我的问题的任何替代方案/解决方案?
我使用了以下代码,
<a href="mailto:recipient@example.com?subject=When%2C%20when%20is%20now%3F%20">Click me</a>
<a href="mailto:recipient@example.com?subject=Test Subject">Click me</a>
<a href="mailto:endpointadress@something.com?cc=endpointadress2@something.com&subject=your subject&body=Text before new line.%0D%0AText after new line.">create email</a>
答案 0 :(得分:0)
如果主题jsut像这样逃避测试:
var link =&#34; mailto:Adviser@helpme.com& subject =&#34; +转义(&#34; [AEP]处理请求&#34;); window.location.href = link;