Javascript Problem! Not changing the css style -


i have code in javascript:

function change() {          document.getelementbyid("mem").classname = 'gif';  } 

the fig , gif this:

a.fig {  background: #ffffff;  }  a.gif {  background: #000099  ; } 

and function used

<a class ="fig" id ="mem" onclick="javascript:change()" href="users" > 

where difference between gif , fig in css have different background colors. problem change noticeable in second , not permanent!

any ideas?

function change() { var mem = document.getelementbyid("mem");     if (mem.classname == 'fig') {         mem.classname = 'gif';     }     else {         mem.classname = 'fig';     } } 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -