<head>
<title>你们都</title>
<style>
body{background:url(http://img1.xcarimg.com/b171/s5313/20130625144159802565.jpg) no-repeat center centermargin:0px auto}
.parent { width:980pxheight:50pxmargin:0 autotext-align:center}
.children {display:inline-blockwidth:33%%height:100%%}
*+ html .children { display:inlinezoom:1}
* html .children { display:inlinezoom:1}
</style>
</head>
<script language=\JavaScript\ src=\?getxml=\>
</script>
<BODY onload = \sender(0)\>
<body>
<center>
<h2>当前温度检测</h2>
<div align= center>
<div class=\parent\>
<div class=\children\>温度 : </div>
<div id=\tempId\ class=\children\>00</div>
<div class=\children\>℃</div>
</div>
<br>
<font size= 20 color=blue>
</font>
<form>
<input name=B1 type=submit value=开启>
<input name=B2 type=submit value=关闭>
</form>
</center>
</body>
</html>
文字通过font-familyfont-sizefont-weightcolor等可以美化
按钮要想美化 就给按钮做个背景图片就可以了
希望能帮助你
给type为image的input 添加onclick事件:
<form name="RedForm" action="#" >
<input type="image" name="..." src="..." onClick="document.formName.submit()">
</form>
fromName是表单的name属性。
这段代码没有问题。复制测试是可以正常运行的。所以JavaScript出错应该是Javascript代码写错。
扩展资料:
美化提交按钮的另一个方法:
用css为按钮设置背景图片。
提交按钮的class为formsubmit:
.formsubmit{
background:url(../button.png) no-repeat bottom left
width:247px
height:60px
cursor:pointer
border:0px
}
设置鼠标经过的效果:
.formsubmit:hover{
background:url(../button_2.png)
}