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

49.按钮只能单击一次,鼠标事件

时间:2017-06-30 17:23:09      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:事件   mouse   style   head   技术分享   over   set   ble   code   

技术分享
 1 <!DOCTYPE html>
 2 <html>
 3 <head lang="en">
 4     <meta charset="UTF-8">
 5     <title></title>
 6     <style>
 7         .over {
 8             color: yellow;
 9             background: #7a7280;
10         }
11 
12         .down {
13             color: yellow;
14             background: #7a7280;
15             font-style: italic;
16         }
17     </style>
18 </head>
19 <body>
20 <!--1.鼠标移入移出事件-->
21 <input type="button"
22        onmousemove="this.className=‘over‘;"
23        onmouseout="this.className=‘‘;"
24        onmousedown="this.className=‘down‘;"
25        onmouseup="this.className=‘over‘;"
26        value="让按钮嵌入"
27        onclick="this.value=‘嵌入成功!‘"
28 
29         />
30 
31 
32 <!--2.按钮只能单击一次-->
33 <button onclick="this.disabled=true">单击</button>
34 
35 
36 </body>
37 </html>
View Code

 

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
.over {
color: yellow;
background: #7a7280;
}

.down {
color: yellow;
background: #7a7280;
font-style: italic;
}
</style>
</head>
<body>
<!--1.鼠标移入移出事件-->
<input type="button"
onmousemove="this.className=‘over‘;"
onmouseout="this.className=‘‘;"
onmousedown="this.className=‘down‘;"
onmouseup="this.className=‘over‘;"
value="让按钮嵌入"
onclick="this.value=‘嵌入成功!‘"

/>


<!--2.按钮只能单击一次-->
<button onclick="this.disabled=true">单击</button>


</body>
</html>

49.按钮只能单击一次,鼠标事件

标签:事件   mouse   style   head   技术分享   over   set   ble   code   

原文地址:http://www.cnblogs.com/mx2036/p/7099092.html

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