updateAuthData.jsp
程序员文章站
2022-04-29 11:30:22
...
弱智级联显示下拉框,鼠标悬浮提示
<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%> <%@ include file="../inc_include.jsp"%> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <style type="text/css"> <!-- label.error { float: none; color: red; padding-left: .5em; vertical-align: top; font-weight: bold } body,td,th { font-size: 12px; } body { background-color: #dde6f3; } #remind { background: #FFF; border: dashed 1px #dddddd;/*dashed 是虚线*/ opacity: 0.8; -moz-opacity: 0.8; filter: alpha(opacity = 800); padding: 5px; } --> </style> <link href="<c:url value="/css/css.css"/>" rel="stylesheet" type="text/css" /> <link href="<c:url value="/css/text1.css"/>" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script> <script type="text/javascript" src="<c:url value="/js/jquery-1.4.2.min.js"/>"></script> <script type="text/javascript" src="<c:url value="/js/jquery.validate.min.js"/>"></script> </head> <body> <script laguage="javascript"> function chgAuthType() {//改变权限类型触发 var form = document.forms["queryConditionsDto"]; var dptSpan = document.getElementById("dptSpan"); var prdSpan = document.getElementById("prdSpan"); var chnSpan = document.getElementById("chnSpan"); if(form.authtype.value=="DPT"){ dptSpan.style.display=""; dptSpan.disabled=false; prdSpan.style.display="none"; prdSpan.disabled=true; chnSpan.style.display="none"; chnSpan.disabled=true; }else if(form.authtype.value=="PRD"){ dptSpan.style.display="none"; dptSpan.disabled=true; prdSpan.style.display=""; prdSpan.disabled=false; chnSpan.style.display="none"; chnSpan.disabled=true; }else if(form.authtype.value=="CHN"){ dptSpan.style.display="none"; dptSpan.disabled=true; prdSpan.style.display="none"; prdSpan.disabled=true; chnSpan.style.display=""; chnSpan.disabled=false; }else{ dptSpan.style.display="none"; dptSpan.disabled=true; prdSpan.style.display="none"; prdSpan.disabled=true; chnSpan.style.display="none"; chnSpan.disabled=true; } } //在鼠标显示一个提示层 function showTip(message,flag){ var remind = document.getElementById("remind"); //将要弹出的层 remind.style.left=event.clientX+10; //鼠标目前在X轴上的位置,加10是为了向右边移动10个px方便看到内容 remind.style.top=parseInt(event.y)+5+document.body.scrollTop; remind.style.position="absolute"; //必须指定这个属性,否则div层无法跟着鼠标动 remind.innerText = message; remind.style.color="blue"; if(flag==0){ remind.style.color="red"; } remind.style.display=""; //div初始状态是不可见的,设置可为可见 } //关闭提示层div的显示 function closeTip(){ var remind = document.getElementById("remind"); remind.style.display="none"; remind.style.color="blue"; } function validateForm() { var form = document.forms["queryConditionsDto"]; var remind = document.getElementById("remind"); if(form.userid.value==""){ showTip("用户ID不能为空",0); return false; } form.userid.value = form.userid.value.toUpperCase(); form.action = "updateAuthDataRun.do"; form.submit(); } </script> <div id="con"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" bordercolor="#dde6f3"> <div id="con-1"> •当前位置:维护数据权限<br/> <div id="con-1-1"> <table width="100%" border="0" cellpadding="0" cellspacing="0" > <form:form commandName="queryConditionsDto" method="post" action="#"> <tr> <td width="10%" height="31" align="right"> <strong>用户ID:</strong> </td> <td width="30%" height="31" align="left"> <form:input path="userid" cssStyle="height:31;width: 144px" onmousemove="showTip('请输入');" onmouseout="closeTip();" /> </td> <td width="10%" height="31" align="right"> <strong>权限类型:</strong> </td> <td width="20%" height="31" align="left"> <form:select path="authtype" onchange="chgAuthType()" onmousemove="showTip('请选择')" onmouseout="closeTip();"> <form:option value="all" label="all" /> <form:option value="DPT" label="机构" /> <form:option value="PRD" label="险类" /> <form:option value="CHN" label="渠道" /> </form:select> <span id="dptSpan" style="display:none"> <form:select path="value" onmousemove="showTip('请选择')" onmouseout="closeTip();"> <form:options items="${orgALLMAP}" /> </form:select> </span> <span id="prdSpan" style="display:none"> <form:select path="value" onmousemove="showTip('请选择')" onmouseout="closeTip();"> <form:options items="${kindALLMAP}" /> </form:select> </span> <span id="chnSpan" style="display:none"> <form:select path="value" onmousemove="showTip('请选择')" onmouseout="closeTip();"> <form:options items="${chanALLMAP}" /> </form:select> </span> </td> </tr> <tr> <br/></tr> <tr> <td align="center" colspan="6"> <input type="button" id="execute" name="execute" value="" onclick="validateForm();" style="width: 32px; height: 23px; border: none; cursor: pointer; background: url('images/msm_r20_c27.jpg');" /> </td> </tr> </form:form> </table> </div> <tiles:insertAttribute name="extractionResult" /> </div> </td> </tr> </table> </div> <div id="remind" style="display:none"></div> </body> </html> <script laguage="javascript"> chgAuthType(); </script>
上一篇: WIN32汇编学习应用之defwindowproc
下一篇: WIN32汇编获取应用程序句柄
推荐阅读