为什么div里面的按钮点击不了
2个回答
展开全部
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns="
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
<style type="text/css">
*{
margin:0;
padding:0;
}
input{
width:120px;
height:40px;
background:#da251a;
color:#fff;
text-align:center;
border:none;
}
.one{
width:300px;
height:100px;
border:1px solid #f00;
}
</style>
<script type="text/javascript">
function dianji(){
var one=document.getElementById("one");
one.style.display="none";
}
</script>
</head>
<body>
<input type="submit" name="" value="Click" onclick="dianji()"/>
<div class="one" id="one"></div>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询