2015-04-21 182 views
-1

我的代碼,HTML 4.01過渡:問題與驗證

<table cellspacing="0" cellpadding="0" border="0" class="forms" id="form-control-number"> 
     <tr> 
      <td colspan="6" align="right"> 
       <span class="nadpis">Pole pro 14 pozic (*)</span> 
      </td> 
     </tr> 
      <form action=""> 
       <tr> 
        <td><label class="required" for="numero">GTIN-8</label></td> 
        <td><INPUT id="numero" class="middle" TYPE="text" NAME=numero SIZE=17 MAXLENGTH=7></td> 
        <td><INPUT class="text-small" TYPE="text" NAME=cc SIZE=1 READONLY></td> 
        <td><INPUT class="submit" TYPE="submit" VALUE="Vypočti" ONCLICK="ccc8(this.form); return false;"></td> 
        <td class="reset-col"><INPUT class="submit" TYPE="reset" VALUE="Vymaž"></td> 
        <td><INPUT class="text" TYPE="text" NAME=chiffre SIZE=14 MAXLENGTH=14 READONLY><span class="hidden-desktop hidden-tablet">Pole pro 14 pozic (*)</span></td> 
       </tr> 
      </form> 
      <form action=""> 
      <tr> 
       <td><label class="required" for="numero2">GTIN-12</label></td> 
       <td><INPUT id="numero2" class="middle" TYPE="text" NAME=numero SIZE=17 MAXLENGTH=11></td> 
       <td><INPUT class="text-small" TYPE="text" NAME=cc SIZE=1 READONLY></td> 
       <td><INPUT class="submit" TYPE="submit" VALUE="Vypočti" ONCLICK="ccc12(this.form); return false;"></td> 
       <td class="reset-col"><INPUT class="submit" TYPE="reset" VALUE="Vymaž"></td> 
       <td><INPUT class="text" TYPE="text" NAME=chiffre SIZE=14 MAXLENGTH=14 READONLY><span class="hidden-desktop hidden-tablet">Pole pro 14 pozic (*)</span></td> 
      </tr> 
      </form> 
</table> 

驗證器是寫:document type does not allow element "FORM" here (line 7) document type does not allow element "TR" here (line 8)

有誰知道爲什麼這個錯誤是怎麼回事?

回答

0

您不能將表單元素添加爲<table><tr>元素的直接子元素。嘗試用<form>圍繞<table>