folio 发表于 2013-2-7 19:01:03

关于“Invalid location of tag (form) ”错误或警告的解决

关于“Invalid location of tag (form) ”错误或警告的解决

Invalid location of tag (form) =无效的位置标记(form)

源代码如下,有错误提示!
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="37%" height="162"> </td><td width="40%"> </td><td width="23%"> </td></tr><form name="MainForm" method="POST" action="loading.jsp"><tr><td height="39" align="right" class="denglv01">姓名:</td><td height="39" align="right"><input name="p_User_Id" type="text" size="20" class="box04"tabindex="1"></td><td height="39"> </td></tr><tr><td height="39" align="right" class="denglv01">密码:</td><td height="39" align="right"><input name="p_User_Pwd" type="password" size="21" class="box04"></td><td height="39"> </td></tr></form><tr><td height="49" colspan="3"><a href="#" ><imgsrc="images_xf/botton3.jpg" width="62" height="21" border="0"></a><a href="#"><img src="images_xf/botton4.jpg" width="62"height="21" border="0"></a></td></tr></table>

修改为:
<form name="MainForm" method="POST" action="loading.jsp"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="37%" height="162"> </td><td width="40%"> </td><td width="23%"> </td></tr><tr><td height="39" align="right" class="denglv01">姓名:</td><td height="39" align="right"><input name="p_User_Id" type="text" size="20" class="box04"tabindex="1"></td><td height="39"> </td></tr><tr><td height="39" align="right" class="denglv01">密码:</td><td height="39" align="right"><input name="p_User_Pwd" type="password" size="21" class="box04"></td><td height="39"> </td></tr><tr><td height="49" colspan="3"><a href="#" ><imgsrc="images_xf/botton3.jpg" width="62" height="21" border="0"></a><a href="#"><img src="images_xf/botton4.jpg" width="62"height="21" border="0"></a></td></tr></table></form>

MyEclipse提示正常了,原因在此:
<form></form>不能写到<table></table>里面!
页: [1]
查看完整版本: 关于“Invalid location of tag (form) ”错误或警告的解决