0
我有這個腳本,以後我會編程來連續更改背景顏色,但由於某種原因它根本不起作用。它不拋出任何錯誤,要麼如何用JS更改網頁的背景顏色?
<html>
<body id = "BGCOLOR" bgcolor = rgb(0,0,0); >
<script>
function ChangeColor(){
document.getElementById("BGCOLOR").bgcolor = "rgb(0,50,0)";
}
ChangeColor();
</script>
</body>
</html>
你參考這個http://stackoverflow.com/questions/197748/怎麼辦-I-變化的背景色,與JavaScript的 –