Here my html:
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="pnl">
<div>
#if {{item.user.age}} > 25 # {{item.user.age}} #end
</div>
</div>
<textarea id="txt" style="width: 500px; height: 500px;"></textarea>
<script>
var div = document.querySelector("#pnl");
//var text = unescape(div.innerHTML);
//var text = decodeURI(div.innerHTML);
var text = decodeURIComponent(div.innerHTML);
document.querySelector("#txt").value = text;
</script>
</body>
</html>
And I always getting '>_;' instead of '>'. unescape or decodeURIComponent don't help me :(. Also screenshot http://ift.tt/1BtgXmH
Aucun commentaire:
Enregistrer un commentaire