试帖3
<!DOCTYPE html><html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
#a{
width: 1000px;
height: 500px;
position: absolute;
left: 200px;
top: 400px;
padding-top: 100px;
background-color: black;
border: 1px black solid ;
text-align: center;
}
#no{
position: absolute;
left: 100px;
top: 100px;
}
</style>
<script>
function a(){
var no = document.getElementById("no");
no.style.left = Math.floor(Math.random()*450)+"px";
no.style.top = Math.floor(Math.random()*280)+"px";
}
function b(){
alert("好玩吗? ")
}
</script>
</head>
<body>
<div id="a" clas="a" style="color: red;">
<span>写的也就一般对吧?</span><br />
<button onclick="b()">yes</button><br />
<button onmouseover="a()" id="no">no</button>
</div>
</body>
</html>
亲爱的 试什么呢亲爱的我手机看不了
页:
[1]