如何用查询字符串中的 br 替换 %0A? [英] How to replace %0A with br from querystring?
问题描述
我正在尝试用 br 替换 %0A 以在邮件中显示换行符.我使用 javascript 将 textarea 值中的文本作为查询字符串发送到 .asp 页面,我看到查询字符串发送 word%0Anextword%0Anextword,但是当我尝试在 .asp 页面中替换它时,没有完成替换.>
从javascript发送到asp页面的查询字符串:
text=word%0Anextword
我尝试像这样替换asp页面中的查询字符串:
texten=replace(request.querystring("texten"),"%0A","
")
我尝试过使用 HtmlEncoding,尝试替换 \n、\r\n 等,但没有任何效果?任何输入都非常有用,谢谢.
使用 chr(10).使用您需要的任何语言:)
Im trying to replace a %0A with a br to display linebreaks in a mail. Im sending a text from a textarea value as a querystring to an .asp page with javascript and I see the querystring sending word%0Anextword%0Anextword, but when I try to replace it in the .asp page, no replacement is done.
The querystring that is sent to the asp page from the javascript:
text=word%0Anextword
and I try to replace the querystring in the asp page like this:
texten=replace(request.querystring("texten"),"%0A","<br>")
I have tryed with HtmlEncoding, tryed to replace \n, \r\n etc, but nothing works? Any input really appriciated, thanks.
Use chr(10). In whatever language you need :)
这篇关于如何用查询字符串中的 br 替换 %0A?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!