Solution to IE setAttribute style problem

  Pi Ke        2011-11-21 12:00:27       4,337        0    

In IE7, the JavaScript setAttribute("style","attributes") doesn't work, but it works in IE 8 and other web  browsers. To solve the STYLE problem in IE 7 we can use a workaround method.

we can use 
element.style.cssText = 'color:#FF0000;';

in IE 7 instead of
element.setAttribute('style','color:#FF0000;');

JAVASCRIPT  STYLE  SOLUTION  SETATTRIBUTE  IE  NOT WORK 

       

  RELATED


  0 COMMENT


No comment for this article.



  RANDOM FUN

What is Big Data?

Big data is like teenage sex: everyone talks about it, nobody really knows how to do it, everyone thinks everyone else is doing it, so everyone claims they are doing it... From Web