jquery修改display属性

酆光熙
2023-12-01
jquery修改display属性
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript">
		$(function(){
			$("#bt1").click(function(){
				$('#re1').css("display","block");
			});
			$("#bt2").click(function(){
				$('#re1').css("display","none");
			});
		});
	</script>
  </head>
  
  <body>
    <input type="file" value=""><input type="button" value="more" id="bt1"><br>
    <div id="re1" style="display:none;">
    	<input type="file" value=""><input type="button" value="remove" id="bt2">
    </div>
    <div id="re2" style="display:none;">
    	<input type="file" value=""><input type="button" value="remove" id="bt3">
    </div>
  </body>
</html>

 类似资料: