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

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