在javascript字符串中添加换行符

时间:2015-06-04 09:57:08

标签: javascript

我正在尝试添加一个"发送电子邮件给朋友"链接。这是脚本:



<SCRIPT language="javascript">
function mailpage()
{
mail_str = "mailto:?subject= Checkout this product I thought you might like";
mail_str += "&body= Hi there, I thought you might like this product I saw on www.xxxxxxxx.co.uk";
mail_str += " " + parent.location.href; 
location.href = mail_str;
}
</SCRIPT>
<div class="email_friend"><A HREF = "javascript:mailpage()">Email this product to a friend</A></div></p>
&#13;
&#13;
&#13;

在邮件正文中,我想在&#34之后有一个新行;你好,&#34;这样:

  

你好,

     

我想你可能会喜欢我在www.xxxxxxxx.co.uk上看到的这个产品

     

有人可以提出建议吗?它在wordpress网站上

0 个答案:

没有答案