开发者

Mailto body, special characters?

I'm trying to have a mailto: body with multiple paragraphs and a URL. I should probably note this is for a mobile web application.

  1. Is there a reason why I can't use \n (even inside JavaScript strings) for new lines? Instead, I'm using %0D%0A.

  2. I'd like to enclose my URL in <>'s so email clients can properly identify it as a URL, but when I try to do that the entire URL doe开发者_JAVA百科sn't show up at all in the body. Is it being escaped, or something? How do I fix this/use <>'s to wrap it?

Thanks!


have you tryed encoding the values with javascript?

eg

<a href="demo@email.com?subject='+encodeURI('emailSubject')+'&body='+encodeURI('emailBody')+'">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜