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
Post a Comment