直接上代码:
<%@ 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>