2014-05-23 344 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