验证器中的错误

时间:2016-04-12 14:49:10

标签: html validation

我在验证器中遇到很多错误,但我不明白其原因。

  1. 结束标记"表格"省略,但指定了OMITTAG NO
  2. 必需属性"动作"未指定
  3. 
    
    <div class="serch_block">
      <form method="post" action="/search">
        <table>
          <tr>
            <td>
              <input type="text" class="form_in" name="search" value="" />
            </td>
            <td>
              <input type="image" src="/design/img/button.jpg" name="submit" style="width:20px;height:19px;" onfocus='this.value="";' value="Поиск" />
            </td>
          </tr>
        </table>
      </form>
    </div>
    &#13;
    &#13;
    &#13;

    1. 文档类型不允许元素&#34; span&#34;这里;缺少&#34; th&#34;,&#34; td&#34;开始标记
    2. &#13;
      &#13;
      <tr>
        <td width="30" valign="top" align="right" class="text2" style="padding-top:10px;padding-right: 62px;">Email:</td>
        <td><input type="text" class="form_in" name="email" /></td>
        <span id="error_email" style="color:#ff0000;" class="<?php if(!isset($errors['email']))echo 'invisible';?>">Name and / or E-mail / are required!</span>
      </tr>
      &#13;
      &#13;
      &#13;

      你能帮帮我吗?

1 个答案:

答案 0 :(得分:0)

这是表格。

<form action="/" method="post">
        <table align="center" border="0">
          
            <tr class="boss">

                <td width="30" valign="top" align="left" class="text2news">Имя:
                </td>
                <td>
                    <input type="text" class="form_in" name="name"  />
                    <span id="error_name" style="color:#ff0000" class="invisible"></span>  </td>
                <!--</td> -->

            </tr>
            <tr>
                <td  width="30" valign="top" align="right" class="text2" style="padding-top:10px;padding-right: 62px;">Email:</td>
                <td ><input type="text" class="form_in" name="email" /></td>
                <span id="error_email" style="color:#ff0000;" class="invisible">Имя и /или E-mail/ обязательны для заполенения!</span>

            </tr>
            <tr class="registrationBot">
                <td><input type="submit"  name="subscribe" value="подписаться" /></td>
                <td><input type="submit"  name="unsubscribe" value="отписаться" /><input type="submit"  name="cleenerror" value="закрыть" /></td>
               
            </tr>
            <tr>
                <td colspan="2" style="color:#ff0000"></td>
            </tr>
        </table>
    </form>