所以我有一个跨度
<span class="delete-btn">✘</span>
我正在尝试在textNode中包含x - ✘
的HTML unicode -
span.appendChild(document.createTextNode("✘"));
答案 0 :(得分:2)
您只需使用let span = document.getElementsByClassName('delete-btn')[0];
span.appendChild(document.createTextNode('\u2718'));
:
<span class="delete-btn">✘</span>
&#13;
module.exports = {
configureWebpack: {
// It will be merged into the final Webpack config
plugins: [
... // Your plugins here...
]
}
}
&#13;