jquery中的这段代码没有效果,点击按钮图片应该消失
<scriptsrc="jQuery.js"></script><script>$(function(){$("#btn").click=function(){$("#b...
<script src="jQuery.js"></script>
<script>
$(function(){
$("#btn").click=function(){
$("#box").css({"display":"none"});
//$("#box").animate({"height":"300px"});
}
});
</script>
<style>
#box{
width:100px;
height:100px;
border:1px solid orange;
background:lightyellow;
}
</style>
</head>
<body>
<button id="btn">按钮</button>
<div id="box"></div>
</body> 展开
<script>
$(function(){
$("#btn").click=function(){
$("#box").css({"display":"none"});
//$("#box").animate({"height":"300px"});
}
});
</script>
<style>
#box{
width:100px;
height:100px;
border:1px solid orange;
background:lightyellow;
}
</style>
</head>
<body>
<button id="btn">按钮</button>
<div id="box"></div>
</body> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询