admin管理员组文章数量:1315807
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?
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?
Share Improve this question asked Nov 19, 2012 at 9:17 MaxMax 8,04510 gold badges36 silver badges39 bronze badges2 Answers
Reset to default 4The 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";
You can set the style inline
mycurrent_row.setAttribute("style", "background:#EEF4EA");
本文标签: javascripthow to set the table39s row background color in IEStack Overflow
版权声明:本文标题:javascript - how to set the table's row background color in IE - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741990356a2408983.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论