Posted By

joseluis on 07/10/07


Tagged

javascript


Versions (?)

asignar class o classname a getAttribute en función del browser


 / Published in: JavaScript
 

  1. var className = navigator.appName=="Netscape" ? 'class': 'className';
  2. obj.setAttribute(className,'clase');

Report this snippet  

You need to login to post a comment.