</html>. 假如我要取得 h1 元素中的文字時: const h1 = document.querySelector('h1') ... Kanao</h1>. innerText 回傳的會是換行的結果; textContent 則會忽略掉它。
確定! 回上一頁