首页 > 其他 > 详细

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

时间:2017-06-30 16:25:46      阅读:189      评论:0      收藏:0      [点我收藏+]
技术分享
 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.按钮只能单击一次,鼠标事件

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!