我显然错过了一些真正明显的关于createTextNode
和createElement
如何工作的东西 - 我有 a very simple test在 div 中显示“Hello World”,但它不显示:
var sp = document.createElement('div');
var tx = document.createTextNode('hello world');
sp.appendChild(tx);
我在做什么蠢事?!
最佳答案
关于javascript - 使用 createTextNode 插入文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20818156/