我一直在阅读有关不同getlementbyID,name等,但我坚持一个问题。我的DOM树是这个样子: <suggestion>
<term>Some text here</term>
<term changed="true"> Some text here </term>
</suggestion>
我试图让标记名长期changed="true"但是当我尝试getEle
假设我有以下DOM结构以网页 <html>
<body>
<div id="id1">Hello, this is div 1</div>
<div>This is div 2</div>
<div>And, this is div 3</div>
</body>
</html>
正如你可以看到,第一div具有ID1,但第二div的id