📄 sysuserinsert.jsp
字号:
<%@ page language="java" pageEncoding="GBK"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>sysuserinsert.jsp</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 href="${pageContext.request.contextPath}/image/main.css" rel="stylesheet" type="text/css">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
//中文;
function isChinese(s){
s = trim(s);
var p = /^[\u0391-\uFFE5]+$/;
return p.test(s);
}
function check(){
var tag = true;
if(document.theform.username.value==""){
var myspan=document.all.aa;
alert("真实姓名不能为空!");
theform.username.focus();
tag = false;
return false;
}
var p = /^[\u0391-\uFFE5]+$/;
var str = document.theform.username.value;
if(!p.test(str)){
alert("真实姓名必须为中文!");
theform.username.focus();
return false;
}
if(document.theform.password.value==""){
var twospan = document.all.bb;
//twospan.innerHTML="<span style='color:red'>密码不能为空!</span>";
alert("用户密码不能为空!");
theform.password.focus();
return false;
}
if(document.theform.password.value != document.theform.passwords.value){
var twospan = document.all.bb;
//twospan.innerHTML="<span style='color:red'>密码不能为空!</span>";
alert("密码不一致请确认后重输!");
theform.passwords.focus();
return false;
}
if(document.theform.roleid.value==""){
var twospan = document.all.cc;
twospan.innerHTML="<span style='color:red'>所属角色不能为空!</span>";
theform.roleid.focus();
return false;
}else{
var twospan=document.all.cc;
twospan.innerHTML="<span style='color:green'> </span>";
}
if(tag){
theform.submit();
}
}
function returns(){
location.href="${pageContext.request.contextPath}/systemUserAtion.do?tag=show";
}
</script>
<script language="javascript">
var xmlHttp;
function createHttpRequest(){
if (window.ActiveXObject){
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}else if (window.XMLHttpRequest){
xmlHttp = new XMLHttpRequest();
}
}
function TextGet(){
var type = document.getElementById("roleid").value;
createHttpRequest();
var url = "${pageContext.request.contextPath}/systemUserAtion.do?tag=changeuserid&roleid="+type+"&date="+new Date();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange = CallBackGet;
xmlHttp.send();
}
function CallBackGet(){
if (xmlHttp.readyState == 4){
if (xmlHttp.status == 200){
parseResult();
}
}
}
function parseResult(){
var rs = xmlHttp.responseText;
var rs2 = xmlHttp.responseText;
if(theform.roleid.value==2){
document.getElementById("realname").value = rs;
}
if(theform.roleid.value==3){
document.getElementById("realname").value = rs2;
}
window.setTimeout("TextGet()",1000);
}
window.setTimeout("TextGet()",100);
</script>
<style type="text/css">
<!--
.STYLE1 { font-size: 14px;
font-weight: bold;
font-family: "宋体";
}
-->
</style>
</head>
<body>
<center>
<p ><span class="STYLE1">系 统 用 户 添 加</span></p>
<html:form action="/systemUserAtion.do?tag=insertuser" styleId="theform" method="post">
<input type="hidden" name="serchname" value="${requestScope.map.serchname}" />
<input type="hidden" name="currentpage" value="${requestScope.map.currentpage}" />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><table width="48%" height="272" border="1" cellpadding="0" cellspacing="0" bordercolor="#D71920">
<tr>
<td align="center" valign="middle"><table width="100%" height="279" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" colspan="3"> </td>
</tr>
<tr>
<td width="4%"> </td>
<td width="92%" align="center"><table width="336" height="259" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="125" align="right" >用户ID号:</td>
<td width="227" align="left">
<html:text property="realname" styleId="realname" readonly="true" value="${requestScope.bean}"></html:text></td>
</tr>
<tr>
<td width="125" align="right">真实姓名 :</td>
<td width="227" align="left">
<html:text property="username" styleId="username" ></html:text></td>
</tr>
<span id="aa"></span>
<tr>
<td align="right">用户密码:</td>
<td align="left">
<html:password property="password" styleId="password"></html:password></td>
</tr><span id="bb"></span>
<tr>
<td align="right" >确认密码:</td>
<td align="left">
<html:password property="passwords" styleId="passwords"></html:password></td>
</tr>
<tr>
<td align="right">所属角色:</td>
<td align="left">
<html:select property="roleid" styleId="roleid">
<logic:notEmpty name="rolelist" scope="request">
<html:optionsCollection name="rolelist" label="rolename" value="nid"/>
</logic:notEmpty>
</html:select></td>
</tr><span id="cc"></span>
<tr>
<td colspan="2" align="center">
<input type="button" name="Submit" value="提 交" onClick="check();">
<input type="reset" name="Submit2" value="重 置">
<input type="button" name="Submit3" value="返 回" onClick="returns();"> </td>
</tr>
</table></td>
<td width="4%"> </td>
</tr>
<tr>
<td height="10" colspan="3"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<logic:notEmpty name="manage" scope="request" >
<tr>
<th height="44" colspan="2" scope="col">
<p>${requestScope.manage} </p>
</th>
</tr>
</logic:notEmpty>
</table>
</html:form>
</center>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -