📜  jquery unescape html - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:28.781000             🧑  作者: Mango

代码示例3
function decodeEntities(encodedString) {
  var textArea = document.createElement('textarea');
  textArea.innerHTML = encodedString;
  return textArea.value;
}

console.log(decodeEntities('1 & 2')); // '1 & 2'