Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试使用字符实体引用创建一个文本节点。(在 JavaScript 中)我没有成功。问题:如何创建带有特殊字符的文本节点?
您应该使用 unicode 值表示法: document.createTextNode("\uf012");
document.createTextNode("\uf012");