javascript - How to change html shorthand to html tag when adding content dynamically -
var encodedhtml = "<ol style="color: rgb(34, 34, 34); font-family: arial, sans-serif;"><li class="mod" style=""> <div class="_odd" style=""><span class="_tgc" style="font-size: 16px;"><b>test data</b> <b>data</b>
which has been identified use in <b>tests</b>
, typically of computer program. <b>data</b>
may used in confirmatory way, typically verify given set of input given function produces expected result.</span></div> </li></ol>";
i want change content html tags , can add div using js.
this should sorted out:
what's right way decode string has special html entities in it?
a few answers down has jquery version:
function htmldecode(value) { return $("<textarea/>").html(value).text(); }
Comments
Post a Comment