05 常用 DOM 方法比较
var text = dom.textContentvar text = dom.textContent || dom.innerTextgetAttribute 对比 dataset 对象
<button id="button" data-author="zhangxinxu">作者是谁?</button>button.getAttribute('data-author') // zhangxinxu
button.dataset.author // zhangxinxugetElementById 对比 querySelector
最后更新于