scenario: need to display raw xml,

what does text() method do:

<> converted to &lt;&gt; i.e. 把操作符号编码为html编码

显示原始html的方法,

function htmlEncode(xml){

//1.to htmlencode

//2. display html

return $("<div />").text(xml).html();

}

相关文章:

  • 2021-11-26
  • 2022-12-23
  • 2021-12-11
  • 2021-11-07
  • 2021-12-16
猜你喜欢
  • 2022-02-02
  • 2021-05-24
  • 2022-01-27
  • 2021-11-28
  • 2021-11-22
  • 2021-09-08
相关资源
相似解决方案