Address_Create.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:6k
源码类别:
电子政务应用
开发平台:
Java
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript" src="/vnex/validate.js" ></script>
- <script language="JavaScript">
- function isDigit (c)
- {
- return ((c >= "0") && (c <= "9"))
- }
- function isInteger (s)
- {
- var i;
- for (i = 0; i < s.length; i++)
- {
- var c = s.charAt(i);
- if (!isDigit(c)) return false;
- }
- return true;
- }
- function isValidChar(str)
- {
- var i,j,strTemp;
- strTemp="<>/\";
- for (i=0;i<str.length;i++)
- {
- j=strTemp.indexOf(str.charAt(i));
- if (j!=-1)
- {
- return false;
- }
- }
- return true;
- }
- function check()
- {
- if (!stripWhitespace(document.myform.companyName.value) || document.myform.companyName.value=="" || document.myform.companyName.value.length>50)
- {
- alert("公司名不能为空,并且少于50个字。");
- document.myform.companyName.focus();
- return false;
- }
- if (document.myform.companyAddress.value.length>50)
- {
- alert("公司地址应少于50个字。");
- document.myform.companyAddress.focus();
- return false;
- }
- if ((!document.myform.companyZip.value=="" && document.myform.companyZip.value.length!=6) || !isInteger(document.myform.companyZip.value))
- {
- alert("公司邮编应该是6位数字。");
- document.myform.companyZip.focus();
- return false;
- }
- if (document.myform.companyTelephone.value.length>20)
- {
- alert("公司电话应少于20个字。");
- document.myform.companyTelephone.focus();
- return false;
- }
- if (document.myform.companyFax.value.length>20)
- {
- alert("公司传真应少于20个字。");
- document.myform.companyFax.focus();
- return false;
- }
- if(!isValidChar(myform.companyName.value) || !isValidChar(myform.companyAddress.value) || !isValidChar(myform.companyTelephone.value)
- || !isValidChar(myform.companyFax.value))
- {
- alert("输入内容不能包括 < > / \ 这些特殊字符。");
- return false;
- }
- else
- return true;
- }
- function createCompany()
- {
- if( !check() )
- {
- return false;
- }
- myform.action= "/mainctrl/commoninfo/addresslist/createAddressListSuccess";
- myform.submit();
- }
- </script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_office.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <DIV align=center>
- <form name="myform" method="post" action="">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center"><br>
- <!--个人信息开始 -->
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr bgcolor="#fafafa">
- <td>
- <table width="600" border="0" cellspacing="1" cellpadding="2" class="title">
- <tr bgcolor="#666666">
- <td colspan="2"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/office/main"><font color="#FFFFFF">办公室管理</font></a>>><a href="/mainctrl/commoninfo/addresslist/getAddressList"><font color="#FFFFFF">外部通讯录</font></a>>>添加公司通讯录</font></td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="17%">
- <font class="strong"> 公司名称:</font>
- </td>
- <td width="83%">
- <input type="text" name="companyName" class="file" size="24"> * (注:带*为必填内容)
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="17%">
- <font class="strong"> 地址:</font><br>
- </td>
- <td width="83%">
- <input type="text" name="companyAddress" class="file" size="72">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="17%">
- <font class="strong"> 邮编:</font>
- </td>
- <td width="83%">
- <input type="text" name="companyZip" class="file" size="6">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td width="17%">
- <font class="strong"> 电话:</font>
- </td>
- <td width="83%">
- <input type="text" name="companyTelephone" class="file" size="24">
- </td>
- </tr>
- <tr bgcolor="#e0e0e0">
- <td width="17%">
- <font class="strong"> 传真:</font>
- </td>
- <td width="83%">
- <input type="text" name="companyFax" class="file" size="24">
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td colspan="2" height="30">
- <div align="center">
- <input type="button" name="Submit" value="保存" class="text" onClick="return createCompany()">
- <input type="reset" name="Submit3" value="重置" class="text" >
- <input type="button" name="Submit2" value="放弃" class="text" onClick="history.back()">
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>