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