
 <script>
    function check(theform, textlengh) {
     if (theform.name.value == "") {
       alert("对不起!您的姓名不能为空!");
       return false;
     }
     if (theform.call.value.length == "") {
       alert("对不起!您的电话不能为空!");
       return false;
     }
     if (theform.email.value == "") {
       alert("对不起!电子邮件不能为空!");
       return false;
     }
     if (theform.content.value.length == "") {
       alert("对不起!咨询或建议不能为空!");
       return false;
     }
     if (theform.lytext.value.length > textlengh) {
       alert("对不起!咨询或建议长度不能超过" + textlengh + "字符!");
       return false;
     }
   }
 </script>
 <table cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
   <tbody>
     <tr>
       <td>
         <P align=center>
           <font face=宋体 color=#000000 size=3></font> </P>
       </td>
     </tr>
   </tbody>
 </table>
 <BR>
 <table cellSpacing=1 cellPadding=0 width="80%" align=center bgColor=#cccccc border=0>
   <form action="../../enews/index.php" method="post" name="form1" id="form1">
     <tbody>
       <tr align=middle bgColor=#eeeeee>
         <td colSpan=2 height=24>
           <font color=#000000>在线留言</font></td>
       </tr>
       <tr>
         <td align=right width="29%" bgColor=#ffffff height=26>
           <font color=#000000>您的姓名:</font></td>
         <td width="71%" bgColor=#ffffff height=24> 
           <input maxLength=15 size=30 name=name>
           <font color=#ff0000>*</font></td>
       </tr>
       <tr>
         <td align=right bgColor=#ffffff height=26>
           <font color=#000000>您的电话:</font></td>
         <td bgColor=#ffffff height=24> 
           <input maxLength=15 size=30 name=call>
           <font color=#ff0000>*</font></td>
       </tr>
       <tr>
         <td align=right bgColor=#ffffff height=26>
           <font color=#000000>电子邮件:</font></td>
         <td bgColor=#ffffff height=24> 
           <input maxLength=50 size=30 name=email>
           <font color=#ff0000>*</font></td>
       </tr>
       <tr>
         <td align=right bgColor=#ffffff height=24>
           <font color=#000000>咨询或建议:</font></td>
         <td bgColor=#ffffff height=24> 
           <textarea name=lytext rows=5 cols=29></textarea>
           <font color=#ff0000>*</font></td>
       </tr>
       <tr bgColor=#ffffff>
         <td align=middle colSpan=2 height=30>
           <input onClick="return check(this.form,'200')" type=submit value="提 交" name=Submit3>
           <input type=reset value="重 置" name=Submit2>
           <input name="enews" type="hidden" id="enews" value="AddGbook" /></td>
       </tr>
   </form>
   </tbody>
 </table> 
标签: alert, CMS网站, theform, value, 留言板
上面是“帝国cms如何做留言板功能”的全面内容,想了解更多关于 帝国cms 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_1198.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

 dedecms织梦模板里显示当前登录会员名
 一款字节跳动出品的中文开发者的AI编程工具—— Trae
 ChinaTextbook:一款提供小初高和大学的PDF教材资源的开源项目
 ebay官网首页入口(盘点ebay各国站点登录网址)