javascript - innerHTML for anchor tag not changing -


i trying change innerhtml anchor text not changing....

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";     } } 

use single equal set value

thedropposition.innerhtml = "text"; 

instead double equal conditions

if(var1==var2){ //.... 

and triple equal identical check

var x=0; var y=false;  if(x===y) alert('they identical'); 

in case alert not appear if double equal condition true


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -