What's the smallest and fastest way to modify a document's background color using javascript? it should be cross browser.
I tried the following which didn't work in firebug:
document.body.bgcolor = "#eee";
document.documentElement.bgcolor = "#eee";
使用backgroundColor
CSS属性:
document.body.style.backgroundColor = "#eeeeee";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.