在页面上通过JavaScript控制表格的隐藏和显示
来源:互联网 发布:淘宝可以买保健品吗 编辑:程序博客网 时间:2024/04/29 21:53
JavaScript的控制语句
function selectInjunction() {
if(document.getElementById("injunctionType").value.trim() == 0) {
document.all.displaysubcode.style.display = "none";
document.all.displayinjunction.style.display = "";
document.all.pipeizhengze.style.display = "";
} else if(document.getElementById("injunctionType").value.trim() == 3) {
document.all.displaysubcode.style.display = "";
document.all.displayinjunction.style.display = "none";
document.all.pipeizhengze.style.display = "";
} else if(document.getElementById("injunctionType").value.trim() == 4) {
document.all.displaysubcode.style.display = "";
document.all.displayinjunction.style.display = "";
document.all.pipeizhengze.style.display = "none";
} else if(document.getElementById("injunctionType").value.trim() == 7) {
document.all.displaysubcode.style.display = "none";
document.all.displayinjunction.style.display = "none";
document.all.pipeizhengze.style.display = "none";
}
}
页面上的触发事件
<td width=45% align="right"><bean:message bundle="ALL_RESOURCE_KEY" key="servinceInjunction.intype.edit"/></td>
<td width="55%" align="left">
<html:select name="smsServiceInjunctionForm" property="injunctionType" onchange="selectInjunction()">
<html:option value="-1"><bean:message bundle="ALL_RESOURCE_KEY" key="servinceInjunction.pselect.edit"/></html:option>
<html:option value="0"><bean:message bundle="ALL_RESOURCE_KEY" key="smsServinceInjunction.injunction"/></html:option>
<html:option value="3"><bean:message bundle="ALL_RESOURCE_KEY" key="smsServinceInjunction.subcode"/></html:option>
<html:option value="4"><bean:message bundle="ALL_RESOURCE_KEY" key="smsServinceInjunction.subcodeinjunction"/></html:option>
<html:option value="7">默认路由</html:option>
</html:select><font color="#FF0000"><html:errors property="defaulterror"/><bean:message bundle="ALL_RESOURCE_KEY" key="global.bitian"/></font>
</td>
</tr>
页面的表格
<table><tr>
<td>
<html:radio name="smsServiceInjunctionForm" property="injunctionMode" value="0"><bean:message bundle="ALL_RESOURCE_KEY" key="servinceInjunction.mode0.edit"/></html:radio>
<html:radio name="smsServiceInjunctionForm" property="injunctionMode" value="1"><bean:message bundle="ALL_RESOURCE_KEY" key="servinceInjunction.mode1.edit"/></html:radio>
</td>
<td id="pipeizhengze" style="display:none">
<html:radio name="smsServiceInjunctionForm" property="injunctionMode" value="2">正则匹配</html:radio>
</td>
<td>
<font color="#FF0000"><bean:message bundle="ALL_RESOURCE_KEY" key="global.bitian"/></font>
</td>
</tr></table>
- 在页面上通过JavaScript控制表格的隐藏和显示
- Javascript表格的显示和隐藏
- javascript巧妙控制表格的显示与隐藏
- javascript 控制表格里的行显示与隐藏
- JavaScript控制按钮的显示和隐藏
- JavaScript控制内容的隐藏和显示
- JavaScript控制页面显示和隐藏带案例
- 利用JavaScript通过单选框radio控制div的显示和隐藏
- JS控制表格的列显示和隐藏
- JavaScript控制当页面正在被下载时在页面上显示loading.....的例子
- javascript 显示和隐藏控制
- javascript控制页面控件隐藏显示的两种方法
- javascript控制页面控件隐藏显示的两种方法
- javascript控制页面控件隐藏显示的两种方法
- JavaScript控制页面控件的隐藏与显示
- javascript控制页面控件隐藏显示的两种方法
- JavaScript控制页面控件的隐藏与显示
- javascript控制页面控件隐藏显示的两种方法
- java.lang.Error: Unresolved compilation problem.
- vss中多个sln包含同一个项目文件时反复牵出的问题。
- matlab图像的邻域操作与块操作
- 用JS选取DropDownList2 的值
- Android中Intent传递对象的两种方法(Serializable,Parcelable)
- 在页面上通过JavaScript控制表格的隐藏和显示
- java--值传递和引用传递
- 使用CString要当心'/0'结束符
- (一)新建一个场景
- TStrings类型变量
- 基于ffmpeg的多媒体框架
- 获得DataGrid行
- file类列出当前目录下的文件
- NAS项目的进展情况