更新时间:2023-11-07 17:19:52
var string = "<strong>asdfadfsafsd</strong>",
results = document.getElementById("results")
results.innerHTML = string;
results.innerHTML = results.textContent;
<div id="results"></div>
首先将其加载为html。然后将其提取为文本,然后再次将其加载为HTML:)
At first load the it as html. Then fetch it as text and then again load it as HTML :)