我正在使用这个:
$("td.amount_to_pay").text('£' + response.new_total);
Run Code Online (Sandbox Code Playgroud)
然而,£正在屏幕上打印出来,我只尝试过£,但这会产生一个字符集问题.
我能做什么?
谢谢.
尝试使用该.html()方法,而不是.text()如果要提供HTML未编码的值以输出为HTML.该.text()方法总是对HTML进行编码.
$("td.amount_to_pay").html('£' + response.new_total);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
353 次 |
| 最近记录: |