在這段代碼中我得到的警報0與其使用「ABC」如何讓李標籤,它是在使用的getElementById
<ul>
<li>First Node</li>
<li id="repoFolder" value="abc">Lazy Node</li>
</ul>
<button onclick="rootFolder()">Click Me</button>
JS UL標籤的價值:
function rootFolder() {
alert(document.getElementById("repoFolder").value);
}