我有:
let mysterious = document.querySelector('.mystery')
console.log(mysterious)
mysterious.innerHTML = 'xxx'
console.log(mysterious)
<h2 class='mystery'>Riddle</h2>
控制台显示:
<h2 class="mystery">xxx</h2>
<h2 class="mystery">xxx</h2>
为什么第一个控制台日志不是<h2 class="mystery">Riddle</h2>
?