在jsp中,单选按钮的点击事件(点击隐藏或显示输入框)


直接上代码:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title></title>
</head>
<script src="js/jquery.min.js"></script>
<body>
<input id="p1" type="text" name="p1"/>
<label> <input id="hide" name="jigoushuxing" type="radio" value="其他" /> 隐藏</label>
<label> <input id="show" name="jigoushuxing" type="radio" value="其他" /> 隐藏</label>
<script type="text/javascript">
$(document).ready(function(){
$("#hide").click(function(){
$("#p1").hide();
});
$("#show").click(function(){
$("#p1").show();
});
});
</script>
</body>
</html>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM