同问
开发者问题收集
将脚本标签代码附加到dom元素上执行,替代document.write
var str = '<script>alert(1)</script>';var decoded = $("<div/>").html(str).text();//document.write(decoded); THIS WORKS, but I want to avoid using document.writevar para = document.createEl
javascript
jquery
html-entities
2020-06-29
«
1
»