Alright, I've dabbled in JavaScript before, but the most useful thing I've written is a CSS style-switcher.(好的,我以前涉猎过JavaScript,但是我写的最有用的东西是CSS样式切换器。)
So I'm somewhat new to this.(所以我对此有些陌生。) Let's say I have HTML code like this:(假设我有这样的HTML代码:)
<div id="foo">
<div class="bar">
Hello world!
</div>
</div>
How would I change "Hello world!"(我将如何更改“ Hello world!”) to "Goodbye world!"(向“再见的世界!”) ?(?) I know how document.getElementByClass and document.getElementById work, but I would like to get more specific.(我知道document.getElementByClass和document.getElementById的工作方式,但我想更具体一点。) Sorry if this has been asked before.(抱歉,以前是否有人问过。)
ask by Tanner Babcock translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…