<!DOCTYPE?html>
<html>
<head>
????<meta?charset="UTF-8">
????<title>Document</title>
????<style>
????#hs?{
????????width:?200px;
????????height:?200px;
????????background:?gray;
????}
????</style>
????<script>
????var?an1?=?document.getElementById("an");
????function?rec()?{
????????var?bs?=?document.getElementById("hs");
????????bs.style.background?=?"red";
????}
????an1.onmouseover?=?rec;
????</script>
</head>
<body>
????<input?id="an"?type="button"?value="按鈕"?/>
????<div?id="hs">
????</div>
</body>
</html>
請問這段js代碼出了什么問題,沒有效果。
abc123456789def
2017-04-10 21:22:50