admin管理员组文章数量:1389772
How can i change the background color of the body
by using the developer console of my browser? I tried it with: document.body.style.backgroundColor('black');
and document.body.style.backgroundColor=black;
But nothing worked.
How can i change the background color of the body
by using the developer console of my browser? I tried it with: document.body.style.backgroundColor('black');
and document.body.style.backgroundColor=black;
But nothing worked.
Share Improve this question edited May 20, 2016 at 1:14 Black asked May 20, 2016 at 1:06 BlackBlack 20.5k46 gold badges188 silver badges296 bronze badges 4-
4
document.body.style.backgroundColor='black'
works butbackgroundColor('black');
is not correct because it's not a function – Madhawa Priyashantha Commented May 20, 2016 at 1:08 -
Oh, i actually used
black
instead of'black'
-.- thank you! – Black Commented May 20, 2016 at 1:09 - 1 jsfiddle/pz0tb427 – Madhawa Priyashantha Commented May 20, 2016 at 1:11
-
wow, im definitely tired... i mean i used
document.body.style.backgroundColor=black;
after using quotes it is working, thank you so much guys. – Black Commented May 20, 2016 at 1:13
1 Answer
Reset to default 6document.body.style.backgroundColor = "black";
本文标签: javascriptChange background color of body with consoleStack Overflow
版权声明:本文标题:javascript - Change background color of body with console - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744599368a2614975.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论