首页 > 代码库 > Jsp页面用table表格来让文字和文本框对齐

Jsp页面用table表格来让文字和文本框对齐

1, border="0" cellpadding="0" cellspacing="20",

第一个是页边距要设置0,第二个是用来指定单元格内容与单元格边界之间的空白距离的大小,第三个是外边距为20(就是行和行之间的间距)

 

<div id="tt" class="easyui-tabs">
<div title="基本信息">
<table align = "center" border="0" cellpadding="0" cellspacing="20"><!-- cellspacing="80"这个是外间距, -->
<tr>
<td>账号:</td>
<td><input type="text" name="account" id="Account" /><span
id="er"></span> <label for="Account"></label></td>
</tr>
</br>
<tr>
<td>密码:</td>
<td><input type="text" name="Password" id="Password" /> <label
for="Password"></label></td>
</tr>
<tr>
<td>请再输入一次密码:</td>
<td><input type="text" name="Enter_the_password_again"
id="Enter_the_password_again" /> <label
for="Enter_the_password_again"></label></td>
</tr>
<tr>
<td>常用手机号码:</td>
<td><input type="text" name="Phonenumber" id="Phonenumber" /> <label
for="Phonenumber"></label></td>
</tr>
<tr>
<td>真实姓名:</td>
<td><input type="text" name="Realname" /></td>
</tr>

<tr>
<td>身份证号码:</td>
<td><input type="text" name="Idcardnumber" /></td>
</tr>
<tr>
<td>代理地区:</td>
<td><select id="Province" name="Province"></select> <select
id="City" name="City"></select> <select id="Area" name="Area"></select>

<script type="text/javascript">
addressInit(‘Province‘, ‘City‘, ‘Area‘);
</script></td>
</tr>
<tr>
<td>公司名称:</td>
<td><input type="text" name="Nameofcompany" /></td>
</tr>
<tr>
<td>推荐人ID:</td>
<td><input type="text" name="Referees" /></td>
</tr>
<tr>
<td>代理法人照片(手持身份证):</td>
<td><input type="file" id="file1" name="Photoagencyasalegalperson" />

</td>
</tr>
<tr>
<td>营业执照:</td>
<td><input type="file" id="file2" name="Thebusinesslicense" />

</td>
</tr>
<tr>
<td>营业执照副本:</td>
<td><input type="file" id="file3" name="Duplicateofbusinesslicense" />

</td>
</tr>
<tr>
<td>银行开户许可证:</td>
<td><input type="file" id="file4" name="Thebankopensanaccountlicence" />

</td>
</tr>
<tr>
<td>父级代理ID:</td>
<td><input type="text" name="Pid" /></td>
</tr>
</tr>
</table>
</div>

Jsp页面用table表格来让文字和文本框对齐