javascript中如果设置style
<body id= "bd " style= "background-color:#0000FF; ">
<input type= "button " value= "n " onclick= "javascript:bd.style.background-color:#000000; " />
</body>
小弟是初学者请问,我向通过点击这个更换他的背景色当时点击后没有反应请高手指点.
------解决方案-------------------- <input type= "button " value= "n " onclick= "javascript:document.getElementById( 'bd ').style.backgroundColor= '#000000 '; "/>