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

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

开发平台:

JavaScript

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