Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法动态更新 HTML 标签?
我拥有的 HTML 标签是:
<p id=something>hello</p>
有没有一种方法可以通过 JavaScript 更改hello为另一个值。
hello
更改该值的最佳方法是什么?
document.getElementById("something").innerHTML = 'Something New';