2014-05-23 342 views
1

請看看下面的代碼:開始標籤​​未關閉?

<table border="0" width="100%" id="id1"> 
    <tr> 
     <td width="15%" nowrap> 
      <Label class="someClass"> Testing </Label> 
     </td> 
     //Error complaining at below line 
     <td width="30%" class="someClass" nowrap> 
      <html-el:text styleClass="Test" property="someProperty" size="30" maxlength="10"/> 
     </td> 
    </tr> 
</table> 

對於第一TD我已經關閉,但在第二TD它的抱怨IWAK0061E開始標記()沒有關閉。

我可以知道有什麼問題嗎?

+0

@JunedAhsan:不要擔心,在實際的代碼中它不會在那裏。我在這裏添加的這一行只是爲了顯示錯誤的位置 –

+0

所有的標籤在共享html中均衡。也許在HTML-EL –

+0

有什麼不對嗎?它抱怨什麼?你在哪裏得到這個錯誤信息?有沒有更多的信息(例如,你怎麼知道它說的是哪一行)? – chrylis

回答

-1

我不知道你爲什麼使用這樣怪異的HTML語法,但我會用:

<table border="0" width="100%" id="id1"> 
    <tr> 
     <td width="15%"> 
      <Label class="some class"> Testing </Label> 
     </td> 
     <td width="30%" class="some class"> 
      <textarea property="some property" maxlength="10" class="some class"></textarea> // all visual stuff is used with class tag 
      <input property="some property" maxlength="10" class="some class"> // or input with one line field 
     </td> 
    </tr> 
</table> 

此外,NOWRAP屬性不是HTML5的支持。改用CSS。

+0

哪一個_weird_指的是? – Baby

+0
+0

哦,標籤由[struts框架]提供(http://stackoverflow.com/tags/struts2/info)我想 – Baby