URL中的标签(\ t)在Outlook Express中无法正常工作 [英] Tab ( \t ) in URL is not working correctly in Outlook Express
本文介绍了URL中的标签(\ t)在Outlook Express中无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个功能可以通过默认电子邮件客户端发送电子邮件。在电子邮件正文中,单词之间的选项卡很少。但是,当我将此消息发送到默认电子邮件客户端(Outlook Express 6.0)时,这些选项卡不存在。
JavaScript代码:
There is a function which send an email via default email client. In body of email message, there are few tabs between words. But, when I send this message to default email client(Outlook Express 6.0), these tabs are not present.
JavaScript Code:
function SendMail() {
try {
var mailAddress = 'test@gmail.com';
var mailSubject = 'Mail Subject';
var mailBody = 'Text goes here';
location.href = 'mailto:' + encodeURIComponent(mailAddress) +
'?subject=' + encodeURIComponent(mailSubject) +
'&body=' + encodeURIComponent(mailBody);
}
catch (err) { alert(err);}
}
测试输出:文字在这里但是,单词之间应该有制表符而不是空格。任何人,帮我解决这个问题?
Test Output: Text goes here But, there should be tab instead of space between words. Anybody, help me what's wrong with this ?
推荐答案
它可能在查看器中显示为HTML。这意味着将忽略制表符和多个空格。为了解决这个问题,请尝试使用<pre>和< / pre>标记围绕您的身体,例如:
var mailBody ='<pre>Text到此处< / pre>;
Its probably displaying as HTML in the viewer. That means that tabs and multiple spaces are ignored. In order to get around this, try surrounding your body with <pre> and </pre> tags, like:
var mailBody = '<pre>Text goes here</pre>';
渲染HTML时忽略多个空格。而是使用
Multiple spaces are neglected while rendering HTML. Instead use
, <p></p>
或任何其他HTML构造
or any other HTML construct
渲染HTML时忽略多个空格。而是使用
Multiple spaces are neglected while rendering HTML. Instead use
, <p> , </p>
或任何其他HTML构造
or any other HTML construct
这篇关于URL中的标签(\ t)在Outlook Express中无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文