<head>
<title>无标题页</title>
<script type="text/javascript"> function changeRed()
{
document.getElementById("one").style.backgroundColor="red";
}
function changeGreen()
{
document.getElementById("one").style.backgroundColor="green";
}
</script>
</head>
<body>
<div id="one"></div>
<input id="btnRed" type="button" value="红色" onclick="changeRed();"/>
<input id="btnGreen" type="button" value="绿色" onclick="changeGreen();" />
</body>
</html>怎么就是出不来啊!! 哪错了
<title>无标题页</title>
<script type="text/javascript"> function changeRed()
{
document.getElementById("one").style.backgroundColor="red";
}
function changeGreen()
{
document.getElementById("one").style.backgroundColor="green";
}
</script>
</head>
<body>
<div id="one"></div>
<input id="btnRed" type="button" value="红色" onclick="changeRed();"/>
<input id="btnGreen" type="button" value="绿色" onclick="changeGreen();" />
</body>
</html>怎么就是出不来啊!! 哪错了
解决方案 »
- js判断对象不为空
- 用IFAME把CCTV13的播放调下来怎么做呢。
- 请问这个怎么做呀
- iframe导入页面问题
- 在页面中嵌入Iframe,Iframe页面表格的每一行都有链接.点击链接时Iframe总是会重新定位到第一行,怎么才可以在点击链接时,Iframe的滚动条保
- 用window.showModelessDialog打开页面后,怎么在打开的页面中获得父页面的某些值?
- 请问如何用JS取得文本框的值!
- 如何动态显示刚选择的图片
- 如何让flash文件高度和宽度为网页的高度和宽度?
- 急急啊
- createElement("span");中添加调用方法 ,appendChild(span);那个大侠来帮下忙!在线等待!(二)
- createElement("span");中添加调用方法 ,appendChild(span);那个大侠来帮下忙!在线等待!
其中div这样写就可以看到效果了