码迷,mamicode.com
首页 > 其他好文 > 详细

通过修改this.className 背景改变的按钮

时间:2016-09-17 10:43:40      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<title>背景改变的按钮</title>
<script src="../js/try.js"></script>
<style>
body{
font-size:12px;
}
.free{
width:286px;
border:1px solid #c1c1c1;
border-top:none;
background-color:#f9f9f9;
}
.overStyle{
color:#489379;
width:102px;
height: 24px;
text-align:center;
border:0;
font-weight:bold;
cursor:pointer;
margin:0 0 0 96px;
background:#2868B8;
}
.outStyle{
color:#489379;
width:102px;
height: 24px;
text-align:center;
border:0;
font-weight:bold;
cursor:pointer; /* 手状 */
margin:0 0 0 96px;
background-color:#f9f9f9;
}
</style>
</head>
<body>
<table align="center" class="free">
<tr><td colspan="2" height="80"></td></tr>
<tr>
<td>
<select name="type">
<option>会员名</option>
<option selected="selected">邮箱名</option>
</select>
</td>
<td><input type="text" name="email" size="15">@sina.com</td>
</tr>
<tr>
<td>密码</td>
<td><input type="text" name="pass" size="15"></td> <!-- 设置input长度 15个字段 -->
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="checkbox" name="remem">记住邮箱名</td>
</tr>
<tr>
<td clospan="2">
<input type="submit" value="登录" class="outStyle"
onmouseover="this.className=‘overStyle‘"
onmouseout="this.className=‘outStyle‘">
</td>
</tr>
</table>
</body>
</html>

通过修改this.className 背景改变的按钮

标签:

原文地址:http://www.cnblogs.com/yesiam/p/5878013.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!