说明: 健康值测试
效果: 点这里在新窗口中看效果!
代码: 要完成此效果需要两个步骤
第一步:把如下代码加入到<head>区域中
第二步:把如下代码加入到<body>区域中
<form NAME="BMI" method="POST">
<center>
<table border="1" bordercolorlight="#808080"
cellspacing="1"
bordercolordark="#FFFFFF" bgcolor="#F0F0F0"
width="613">
<tr>
<td width="72" align="center"><p>体重
(kg)
</td>
<td align="center" width="64"><p>身高(cm)
</td>
<td align="center" width="55"><p>健康值
</td>
<td align="center" width="313"><p>电脑对您的评价
</td>
<td align="center" width="75">
<input TYPE="reset" VALUE="取 消" onClick="ClearForm(this.form)">
</td>
</tr>
<tr align="center">
<td width="72">
<input TYPE="TEXT" NAME="weight"
SIZE="6" onFocus="this.form.weight.value=''">
</td>
<td width="64">
<input TYPE="TEXT" NAME="height"
SIZE="6" onFocus="this.form.height.value=''">
</td>
<td width="55">
<input TYPE="TEXT" NAME="bmi" SIZE="5">
</td>
<td width="313">
<input TYPE="TEXT" NAME="my_comment"
size="40">
</td>
<td width="75">
<input TYPE="button" VALUE="确 定"
onClick="computeform(this.form)">
</td>
</tr>
</table>
</center>
</form>
作者:佚名 来源: 网上转帖 |