Contact.jsp~20~
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:6k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

JavaScript

  1. <%@ page contentType="text/html; charset=GBK" %>
  2. <html>
  3. <head>
  4. <%@ include file="WebInfo.jsp" %>
  5. <script type="text/javascript">
  6. var $ = function(s)
  7. {
  8.   return (typeof s == "object") ? s: document.getElementById(s);
  9. };
  10. function Check(){
  11.   if($("txtName").value == ""){
  12.     <c:if test="${sessionScope.Language == 'CN'}">
  13.     alert("请填写您的姓名");
  14.     </c:if>
  15.     <c:if test="${sessionScope.Language == 'EN'}">
  16.     alert("Please fill in your name");
  17.     </c:if>
  18.     return false;
  19.   }
  20.   if($("txtContent").value == ""){
  21.     <c:if test="${sessionScope.Language == 'CN'}">
  22.     alert("请填写留言内容");
  23.     </c:if>
  24.     <c:if test="${sessionScope.Language == 'EN'}">
  25.     alert("Please fill in your name");
  26.     </c:if>
  27.     return false;
  28.   }
  29.   if (!document.getElementById("txtEmail").value.match(/^[a-zA-Z0-9_u4E00-u9FA5uFE30-uFFA0-]+@{1}[a-zA-Z0-9]+[.]{1}[a-zA-Z]+[.]?[a-zA-Z]*$/)){
  30.     alert("请按正确的格式输入电子邮箱地址!")
  31.     return false
  32.   }
  33. }
  34. </script>
  35. </head>
  36. <body bgcolor="#ffffff">
  37. <form action="<%=request.getContextPath()%>/LeaveWord.do?todo=AddLeaveWord" id="form1" method="POST">
  38. <%@ include file="Top/Top.jsp" %>
  39. <%@ include file="Top/MenuBanner.jsp" %>
  40. <table width="840" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:6px;">
  41.   <tr>
  42.     <td width="166" height="330" valign="top" bgcolor="#F6F6F6"><%@ include file="Left/LeftMenu.jsp" %></td>
  43.     <td width="674" valign="top" style="padding:5px">
  44.       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  45.         <tr>
  46.           <td>
  47.             <table width="100%" border="0" cellspacing="0" cellpadding="0">
  48.               <tr>
  49.                 <td width="30%">&nbsp;<strong><font color="#C80000" >&nbsp;<l:out CNLetter="发表留言" ENLetter="Appear Message"/></font></strong></td>
  50.                 <td width="70%" valign="bottom"><div align="right" class="LoginTitle"><l:out CNLetter="当前位置:首页 &gt; 联系我们" ENLetter="Position:Home &gt; Contact us"/></div></td>
  51.               </tr>
  52.             </table>
  53.             <table width="100%" border="0" cellspacing="0" cellpadding="0">
  54.               <tr>
  55.                 <td height="2"></td>
  56.               </tr>
  57.               <tr>
  58.                 <td height="1" background="<%=request.getContextPath()%>/images/Lines.gif"></td>
  59.               </tr>
  60.             </table>
  61.           </td>
  62.         </tr>
  63.       </table>
  64.       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  65.         <tr>
  66.           <td height="276" valign="top" style="padding:5px;">
  67.             <table cellspacing="1" cellpadding="4" width="100%" border="0">
  68.               <tr>
  69.                 <td width="12%" bgcolor=#f2f2f2>&nbsp;</td>
  70.                 <td valign=top width="88%" bgcolor=#f2f2f2>
  71.                   <font color="#000000"><l:out CNLetter="注意:以下 * 星号标出的项目必需填写." ENLetter="Note: Following * asterisk marked items are required."/> </font>
  72.                 </td>
  73.               </tr>
  74.               <tr bgcolor=#fafafa>
  75.                 <td width="12%">*<l:out CNLetter="你的名字" ENLetter="Name"/>:</td>
  76.                 <td width="88%">
  77.                   <input class="stdedit" id="txtName" maxlength="20" size="15" name="name">
  78.                   &nbsp;&nbsp;<l:out CNLetter="男" ENLetter="Man"/>:
  79.                   <input name="sex" type="radio" value="1" checked="checked">
  80.                   &nbsp;&nbsp;<l:out CNLetter="女" ENLetter="Woman"/>:
  81.                   <input type="radio" value="2" name="sex">
  82.                 </td>
  83.               </tr>
  84.               <tr>
  85.                 <td width="12%" bgcolor="#f2f2f2"><l:out CNLetter="来自哪里" ENLetter="Address"/>: </td>
  86.                 <td valign="top" width="88%" bgcolor="#f2f2f2">
  87.                   <input class="stdedit" id="txtAddress" maxlength="25" size="25" name="address">
  88.                 </td>
  89.               </tr>
  90.               <tr bgcolor=#fafafa>
  91.                 <td width="12%"><l:out CNLetter="电子邮件" ENLetter="Email"/>:</td>
  92.                 <td valign=top width="88%">
  93.                   <input class="stdedit_en" id="txtEmail" maxlength="50" size="35" name="email">
  94.                   QQ:
  95.                   <input class="stdedit_en" id="txtQQ" maxlength="12" size="10" name="qq">
  96.                 </td>
  97.               </tr>
  98.               <tr>
  99.                 <td width="12%" bgcolor="#f2f2f2"><l:out CNLetter="你的主页" ENLetter="Personal Home"/>:</td>
  100.                 <td valign="top" width="88%" bgcolor="#f2f2f2">
  101.                   <input class="stdedit_en" id="txtHost" maxlength="70" size="55" value="http://" name="host">
  102.                 </td>
  103.               </tr>
  104.               <tr>
  105.                 <td valign="top" width="12%" bgcolor="#f2f2f2">*<l:out CNLetter="你的留言" ENLetter="Content"/>: </td>
  106.                 <td width="88%" bgcolor=#f2f2f2>
  107.                   <textarea class="stdedit" id="txtContent" name="content" rows="10" cols="55"></textarea>
  108.                 </td>
  109.               </tr>
  110.               <tr bgcolor=#fafafa>
  111.                 <td valign=top width="12%">&nbsp;</td>
  112.                 <td width="88%">
  113.                   <input class="stbuttom2" type="submit" value="<l:out CNLetter="确定留言" ENLetter="Submit"/>" onclick="return Check();" name="btnSave">
  114.                   <input class="stbuttom2" type="reset" value="<l:out CNLetter="清除内容" ENLetter="Clear"/>" name="btnR">
  115.                 </td>
  116.               </tr>
  117.             </table>
  118.           </td>
  119.         </tr>
  120.       </table>
  121.     </td>
  122.   </tr>
  123. </table>
  124. <%@ include file="Bottom.jsp" %>
  125. </form>
  126. </body>
  127. </html>