我正在尝试更改innerHTML
锚文本,但它没有改变......
HTML:
<div style="float:right;">
<a id="grabLinkAll" onClick="showAll()" href="#">show all</a>
</div>
JavaScript:
function showAll() {
var theDropPosition = document.getElementById('grabLinkAll');
if (theDropPosition.innerHTML == "show all") {
theDropPosition.innerHTML == "hide all";
} else {
theDropPosition.innerHTML == "show all";
}
}