Html学习笔记3
2015-09-08 20:50
429 查看
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>mouse function</title>
<script>
function mouseDown(obj){//按下鼠标处理事件
obj.style.background="#1ec5e5";
obj.innerHTML="release you mouse";
}
function mouseUp(obj){//松开鼠标的处理事件
obj.style.background="green";
obj.innerHTML="press here"
}
</script>
</head>
<body>
<div style="background-color:green;
width:200px;
height:35px;
margin:20px;
padding-top:20px;
color:rgb(255,255,255);
font-weight:bold;
font-size:18px;
text-align:center;"
onmousedown="mouseDown(this)"
onmouseup="mouseUp(this)"
>press here</div>
</body>
</html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>mouse function</title>
<script>
function mouseDown(obj){//按下鼠标处理事件
obj.style.background="#1ec5e5";
obj.innerHTML="release you mouse";
}
function mouseUp(obj){//松开鼠标的处理事件
obj.style.background="green";
obj.innerHTML="press here"
}
</script>
</head>
<body>
<div style="background-color:green;
width:200px;
height:35px;
margin:20px;
padding-top:20px;
color:rgb(255,255,255);
font-weight:bold;
font-size:18px;
text-align:center;"
onmousedown="mouseDown(this)"
onmouseup="mouseUp(this)"
>press here</div>
</body>
</html>
相关文章推荐
- Html学习笔记2
- Html学习笔记1
- C# 去除HTML标签
- web模板
- html 基础
- HTML布局relative和absolute
- html上汉字乱码解决
- html分页
- 【备忘】html最最常用的属性和标签
- 让HTML 表格中内容自动换行及顶端对齐
- emoji表情在web html上显示
- Write a simple HTML Browser(1088)
- html设定按钮位置示例
- 打开本地html
- html嵌套另一个html解决办法
- 四个常见html网页乱码问题及解决办法
- wap手机网页html通过特殊链接:打电话,发短信,发邮件详细教程
- 4.html列表标签
- JQ之html,text,val
- HTML编写需要注意的事项