药品和保健品的6大区别:dw里面为什么做一个表单然后往里面输入内容然后F12测试的时候就会在文字底下多出来一行

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/30 07:56:12

这不是DW引起的,是HTML规范,如果直接<form></form>中引用控件内容,是会多出来一行的,可以把FORM加入到TR或TD嵌套中。比如,原来是
<table width="100%" border="0">
<tr>
<td><form id="form1" name="form1" method="post" action="">
<input type="text" name="textfield" />
<input type="submit" name="Submit" value="提交" />
</form>
</td>
</tr>
</table>
显示时候确实会多出一行,但如果改成
<table width="100%" border="0">
<tr><form id="form1" name="form1" method="post" action="">
<td>
<input type="text" name="textfield" />
<input type="submit" name="Submit" value="提交" />
</td></form>
</tr>
</table>
这样就不会了