?? addpersoninput.jsp
字號:
<!-- 系統(tǒng)名稱:光大花園物業(yè)管理系統(tǒng) -->
<!-- 程序名稱:AddPersonInput.jsp -->
<!-- 程序類型:jsp文件 -->
<!-- 功能簡述:增加員工資料輸入頁面 -->
<!-- 作 者:賈紅霞 -->
<!-- 公 司:長春中聯 -->
<!-- 完成時間:2001/08/27 -->
<!-- 修 改 人:畢鋒 -->
<!-- 修改內容:頁面 -->
<!-- 修改時間:2001/11/29 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META name="GENERATOR" content="IBM WebSphere Page Designer V3.5 for Windows">
<META http-equiv="Content-Style-Type" content="text/css">
<title>添加員工</title>
<link rel="stylesheet" href="/pmsApp/css/wuye.css" type="text/css">
<% Vector vdeptname= (Vector) session.getValue("vdeptname");
int max = vdeptname.size();
%>
<script lanuage="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script language="JavaScript" src="/pmsApp/common/wuye.js"></script>
<script language="JavaScript">
function Change(){
reason.style.display='';
}
function Change1(){
reason.style.display='none';
}
function ChkStandard(num) //被ChkForm()函數調用
{
for(i_loop=0;i_loop<2;i_loop++)
{
if (!((num.charAt(i_loop)>=0)&&(num.charAt(i_loop)<=9)))
{
return false ;
}
}
return true;
}
//判斷是否含有非法字符
function ChkUnvialble(num){
for(i=0;i<10;i++){
if(!((num.charAt(i)>=0)&&(num.charAt(i)<=9))&&(!((num.charAt(i)>="a")&&(num.charAt(i)<="z")))&&(!((num.charAt(i)>="A")&&(num.charAt(i)<="Z"))))
{
return false;
}
}
}
function checkForm(form1)
{ var flag=true;
if(flag&(((window.document.form1.text1.value.length<1))))
{
alert("請必須輸入員工姓名!");
window.document.form1.text1.select();
flag=false;
}
if(flag&(((window.document.form1.text2.value!=""))))
{
if(flag&(((window.document.form1.text2.value.length<8)))) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
if (flag) {
flocal = window.document.form1.text2.value.indexOf("-");
llocal = window.document.form1.text2.value.lastIndexOf("-");
if ((flocal==-1)||(llocal==-1)||(flocal==llocal)||(llocal-flocal==2)) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
}
if (flag) {
var k=0;
for (i =0 ;i<4;i++) {
if(!((window.document.form1.text2.value.charAt(i)>=0)&&(window.document.form1.text2.value.charAt(i)<=9))) {
k++;
}
}
if (k>0) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
if (flag&(!(window.document.form1.text2.value.charAt(4)=="-"))) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
if (flag&(!((window.document.form1.text2.value.charAt(5)>=0)&&(window.document.form1.text2.value.charAt(5)<=9)))) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
if (flag&(!((window.document.form1.text2.value.charAt(window.document.form1.text2.value.lastIndexOf("-")-1)>=0)&&(window.document.form1.text2.value.charAt(window.document.form1.text2.value.lastIndexOf("-")-1)<=9)))) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
if (flag&(((window.document.form1.text2.value.length-window.document.form1.text2.value.lastIndexOf("-")-1>2)||(window.document.form1.text2.value.length-window.document.form1.text2.value.lastIndexOf("-")-1==0)))) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
if (flag&(!((window.document.form1.text2.value.charAt(window.document.form1.text2.value.lastIndexOf("-")+1)>=0)&&(window.document.form1.text2.value.charAt(window.document.form1.text2.value.lastIndexOf("-")+1)<=9)))) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
if (flag&(!((window.document.form1.text2.value.charAt(window.document.form1.text2.value.length-1)>=0)&&(window.document.form1.text2.value.charAt(window.document.form1.text2.value.length-1<=9))))) {
alert("出生日期格式應類似于1999-02-12!");
window.document.form1.text2.select();
flag=false;
}
}
}
if(flag&(window.document.form1.file1.value!=""))
{
llocal = window.document.form1.file1.value.lastIndexOf("\\");
if (llocal==-1) {
alert("圖片不存在!");
window.document.form1.file1.select();
flag=false;
}
if (flag) {
if (window.document.form1.file1.value.length-llocal-1>15) {
alert("圖片名稱不能超過15個字!");
window.document.form1.text3.select();
flag=false;
}
}
}
if(flag&(((window.document.form1.text3.value.length<1))))
{
alert("請必須輸入員工編號!");
window.document.form1.text3.select();
flag=false;
}
if (flag &(window.document.form1.text3.value!="")) {
if (ChkUnvialble(window.document.form1.text3.value)==false) {
alert("員工編號含有非法字符!");
window.document.form1.text3.select();
flag=false;
}
}
if(flag&(((window.document.form1.text6.value.length>50))))
{
alert("專長不能超過50字!");
window.document.form1.text6.select();
flag=false;
}
if(flag&(((window.document.form1.text666.value.length>50))))
{
alert("離職原因不能超過50字!");
window.document.form1.text666.select();
flag=false;
}
if(flag&(((window.document.form1.text7.value.length>50))))
{
alert("愛好不能超過50字!");
window.document.form1.text7.select();
flag=false;
}
if (flag &(window.document.form1.text10.value!="")) {
if (ChkUnvialble(window.document.form1.text10.value)==false) {
alert("身份證號含有非法字符!");
window.document.form1.text10.select();
flag=false;
}
}
if(flag&(((window.document.form1.text13.value!=""))))
{
if(flag&(((window.document.form1.text13.value.length<8)))) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
if (flag) {
flocal = window.document.form1.text13.value.indexOf("-");
llocal = window.document.form1.text13.value.lastIndexOf("-");
if ((flocal==-1)||(llocal==-1)||(flocal==llocal)) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
}
if(flag) {
flocal = window.document.form1.text13.value.indexOf("-");
llocal = window.document.form1.text13.value.lastIndexOf("-");
if (llocal-flocal==2) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
}
if (flag) {
for (i =0 ;i<4;i++) {
if(!((window.document.form1.text13.value.charAt(i)>=0)&&(window.document.form1.text13.value.charAt(i)<=9))) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
}
if (flag&(!(window.document.form1.text13.value.charAt(4)=="-"))) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
if (flag&(!((window.document.form1.text13.value.charAt(5)>=0)&&(window.document.form1.text13.value.charAt(5)<=9)))) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
if (flag&(!((window.document.form1.text13.value.charAt(window.document.form1.text13.value.lastIndexOf("-")-1)>=0)&&(window.document.form1.text13.value.charAt(window.document.form1.text13.value.lastIndexOf("-")-1)<=9)))) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
if (flag&(((window.document.form1.text13.value.length-window.document.form1.text13.value.lastIndexOf("-")-1>2)||(window.document.form1.text13.value.length-window.document.form1.text13.value.lastIndexOf("-")-1==0)))) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
if (flag&(!((window.document.form1.text13.value.charAt(window.document.form1.text13.value.lastIndexOf("-")+1)>=0)&&(window.document.form1.text13.value.charAt(window.document.form1.text13.value.lastIndexOf("-")+1)<=9)))) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
if (flag&(!((window.document.form1.text13.value.charAt(window.document.form1.text13.value.length-1)>=0)&&(window.document.form1.text13.value.charAt(window.document.form1.text13.value.length-1<=9))))) {
alert("入職時間格式應類似于1999-02-12!");
window.document.form1.text13.select();
flag=false;
}
}
}
if(flag)
{
handleForm(form1);
}
}
function handleForm(inputForm)
{
var str="";
var del2="☆";
var del ="※";
for (i=0; i<inputForm.elements.length; i++)
{
if ((inputForm.elements[i].name!="txId")&&(inputForm.elements[i].name!="inputString")&&(inputForm.elements[i].type!="button")&&(inputForm.elements[i].type!="file"))
{
if ((inputForm.elements[i].name.toUpperCase() != "提交") &&
(inputForm.elements[i].name.toUpperCase() != "復位"))
{
if ((inputForm.elements[i].type == "radio") ||
(inputForm.elements[i].type == "checkbox"))
{
if (inputForm.elements[i].checked)
{
str = str+inputForm.elements[i].name+del2+inputForm.elements[i].value+del;
}
}
else if (inputForm.elements[i].type == "select-one")
{
str = str+inputForm.elements[i].name
+del2+inputForm.elements[i].options[inputForm.elements[i].selectedIndex].value+del;
}
else
{
str = str+inputForm.elements[i].name+del2+inputForm.elements[i].value+del;
}
}
}
}
str=str.substr(0,str.length-del.length);
inputStr=str;
inputForm.inputString.value=str;
inputForm.submit();
}
</script>
</head>
<body text="#000000" bgcolor="menu" leftmargin="0" topmargin="0" >
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td height="28" background="/pmsApp/images/toolbar2.gif" valign="top"><img src="/pmsApp/images/blank.gif" width="10" height="1"><img src="/pmsApp/images/button_new_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_modify_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_del_gray.gif" width="55" height="20"><img src="/pmsApp/images/button_split.gif" width="8" height="20"><img name="Image13" border="0" src="/pmsApp/images/button_query_gray.gif" width="55" height="20" alt="條件檢索"><img src="/pmsApp/images/button_split.gif" width="8" height="20"></td>
</tr>
</table>
<br>
<table width="308" border="1" align="center" bgcolor="#FFFFFF" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0" height="22">
<tr>
<td align="center" bgcolor="#eeffee">增加員工資料</td>
</tr>
</table>
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="/pmsApp/servlet/common.PMS">
<input type="hidden" name="txId" id="txId" value="3012">
<input type="hidden" name="inputString" id="inputString">
<table width="98%" border="1" align="center" bgcolor="#d4d0c8" bordercolorlight="#808080" bordercolordark="#FFFFFF" cellspacing="0" cellpadding="0">
<tr>
<td align="center" colspan="2" bgcolor="#d4d0c8">員工姓名</td>
<td bgcolor="#d4d0c8" width="130">
<input type="text" name="text1" size="8" maxlength="10">
<font color="#FF3300">*</font> </td>
<td bgcolor="#d4d0c8" align="center" width="174">性 別</td>
<td width="214"> 男
<input type="radio" name="radio1" value="0" checked>
女
<input type="radio" name="radio1" value="1">
</td>
<td rowspan="5" align="center" width="100" height="142">照片
<input type="file" name="file1" size="5">
</td>
</tr>
<tr>
<td align="center" colspan="2" bgcolor="#d4d0c8">出生日期</td>
<td bgcolor="#d4d0c8" width="130">
<input type="text" name="text2" size="8" maxlength="10">
</td>
<td bgcolor="#d4d0c8" align="center" width="174">員工編號</td>
<td width="214">
<input type="text" name="text3" size="20" maxlength="30">
<font color="#FF3300">*</font> </td>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -