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