最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jquery 隱藏與顯示tr標(biāo)簽示例代碼

 更新時(shí)間:2014年06月06日 10:50:41   作者:  
隱藏與顯示tr標(biāo)簽的方法有很多,本文使用jquery來(lái)實(shí)現(xiàn),需要的朋友可以參考下
廢話少說(shuō) 直接上代碼 代碼是程序員交流的最好方式 哈哈:
復(fù)制代碼 代碼如下:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="js/jquery-1.8.2.js"></script>
<script type="text/javascript">
function selectChange(obj){
var value=obj.value;
var v1 = document.getElementById("tr1");
var v2 = document.getElementById("tr2");
if(value==0){
console.log("two is hidden");
v1.style.display="none";
v2.style.display="none";
}else if(value==1){
v1.style.display="block";
v2.style.display="none";
}else{
v1.style.display="none";
v2.style.display="block";
//將里面的值設(shè)為空
}
}
</script>
</head>
<center>
<body >
<form action="GetJSPContent" method="post">
<table>
<tr>
<td>通知標(biāo)題</td>
<td><input type="text" name="title"/></td>
</tr>
<tr>
<td>通知內(nèi)容</td>
<td><textarea cols="50" rows="10" name="cxt" >內(nèi)容這塊暫時(shí)沒(méi)處理,本次測(cè)試用例 需要10個(gè)漢字以上測(cè)試</textarea></td>
</tr>
<tr>
<td>通知類型</td><td><select onchange="selectChange(this)">
<option value="0" select="true">所有用戶</option>
<option value="1">用戶組</option>
<option value="2">單用戶</option>
</select></td>
</tr>
<tr id="tr1" style="display:none">
<td> 輸入標(biāo)簽:</td><td><input type="text" id="tag1" name="tag"></td>
</tr>
<tr id="tr2" style="display:none">
<td> 輸入號(hào)碼:</td><td><input type="text" id="phone" name="phone"></td>
</tr>
<tr>
<td><input type="submit"/></td>
<td><input type="reset"/></td>
</tr>
</table>
</form>
</body>
</center>
</html>

實(shí)現(xiàn)效果如下:

相關(guān)文章

最新評(píng)論

平安县| 驻马店市| 鲜城| 丘北县| 贵溪市| 宁城县| 桑植县| 延安市| 开化县| 江油市| 宣威市| 许昌县| 遵义县| 南岸区| 泰顺县| 确山县| 克山县| 礼泉县| 延寿县| 南漳县| 汉阴县| 饶阳县| 登封市| 鲁山县| 宜宾市| 衡东县| 临高县| 固镇县| 宁武县| 应城市| 长垣县| 石台县| 建阳市| 壶关县| 蒲城县| 嘉善县| 中西区| 万宁市| 郸城县| 敦煌市| 阿城市|