发布于 2023-10-10 14:52:43 浏览 317 次
var htmlEntity = "´";var code = htmlEntity.replace(/&#(\d+);/g, function(match, dec) { return String.fromCharCode(dec);});console.log(code); // 输出 "´"