如果让td里面的textbox刚好占满td的剩余空间(td中还有其他控件)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <BODY> <TABLE style="table-layout:fixed" border=1> <TR> <TD><nobr>aaaaaa abcd<input type=text style="margin-left:0;margin-right:0"></TD> </TR> </TABLE> </BODY></HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE>New Document</TITLE><META NAME="Generator" CONTENT="EditPlus"><META NAME="Author" CONTENT=""><META NAME="Keywords" CONTENT=""><META NAME="Description" CONTENT=""></HEAD><BODY><TABLE class="tbl" style="border:1px solid #CCC"> <TR> <TD nowrap>aaaaaa abcd</TD> <TD width="100%"><input type=text style="margin-left:0;margin-right:0; width:100%"></TD> </TR></TABLE></BODY></HTML>
[解决办法]
class没用到,去掉吧。
[解决办法]
分成两个td了,你没copy代码下来试试吗?
[解决办法]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<TABLE style="table-layout:fixed" border=1>
<TR>
<TD>aaaaaa abcd<input type=text style="margin-left:0;margin-right:0; width:80%;"></TD>
</TR>
</TABLE>
</BODY>
</HTML>
根据控件大小来设置<INPUT TYPE="TEXT"/>的宽度
[解决办法]
rregdfffffffffffff