Reputation: 8045
i used
mycurrent_row.setAttribute("bgcolor", "#EEF4EA");
it worked for both firefox and chrome.but no color was set in ie
i use
mycurrent_row.setAttribute("bgcolor", "#EEF4EA");
mycurrent_row.bgcolor = "#EEF4EA";
it neither work.
How can i set the row's color in IE?
Upvotes: 2
Views: 8500
Reputation: 700910
The attribute is named bgColor
, not bgcolor
, but you should rather use the backgroundColor CSS property for styling instead of the deprecated HTML attribute bgColor:
mycurrent_row.style.backgroundColor = "#EEF4EA";
Upvotes: 4
Reputation: 1568
You can set the style inline
mycurrent_row.setAttribute("style", "background:#EEF4EA");
Upvotes: 3