setAttribute is not working for 'style' attribute on IE

  • Thread starter Ali Nadalizadeh
  • Start date
A

Ali Nadalizadeh

Guest
I'm porting a piece of JS code written for Firefox into Internet Explorer. I faced a problem of changing style of an element using setAttribute method which was working on Firefox.

button.setAttribute('style', 'float: right;');


I tried setting the style member of button and it didn't work either. This was the solution in case of setting onclick event handler.

button.style = 'float: right;';


First I wanna know the solution for the above problem and
Second are there any maintained lists for these differences between browsers ?

Continue reading...
 
Top