js的第一个事件动画
枫2019-05-03 16:39:42238<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
// var b =5,a=6;
// var c=a+b;
// document.write(c)
// alert(c)
// confirm('请确认')
// prompt('请输入你的名字')
function yourname(x) {
x.style.background="pink";
}
function myonblur(y) {
y.style.height='100px';
y.style.width='600px'
}
</script>
</head>
<body>
<label for="name">姓名</label>
<input type="text" onfocus="yourname(this)" onblur="myonblur(this)">
<div style="width: 100px;height: 100px;background: aqua;"
onmouseover="yourname(this)" onmouseout="myonblur(this)">
test
</div>
</body>