Solution to IE setAttribute style problem

  Pi Ke        2011-11-21 12:00:27       4,379        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  SETATTRIBUTE  IE  NOT WORK  SOLUTION 

       

  RELATED


  0 COMMENT


No comment for this article.



  RANDOM FUN

pdf is the third largest religion

When typing "How do I convert to ", the suggested search terms will be : How do I convert to islam How do I convert to Judaism How do I convert to pdf How do I convert to catholicism From the above list, pdf is the third largest religion now.