|
<!--自訂頁面內容開始-->
<div class="container">
<div class="side">
<div class="content">
<script language="JavaScript">
<!--Copyright: Best Sense Development Limited / hk-doctor.com
function test_it(entry) {
if (entry.value!=null && entry.value.length!=0) {
entry.value=""+ eval(entry.value);
}
computeForm(entry.form);
}
function round(number_out) {
number_out = (parseInt(number_out*10))/10;
return number_out;
}
function computeForm(form) {
if ((form.HT_m.value==null || form.HT_m.value.length==0) ||
(form.WT_kg.value==null || form.WT_kg.value.length==0)) {
return;
}
if (!alrt_msg(form.HT_m,1,3,"身高中,") ||
!alrt_msg(form.WT_kg,40,150,"體重中,")) {
form.bmi.value="所填數值不在計算範圍內 - 請按重填";
return;
}
var x= eval(form.HT_m.value);
var y= eval(form.WT_kg.value);
form.RANGE1.value= "<" + round(x*x*18.5);
form.RANGE2.value= round(x*x*18.5) + "-" + round(x*x*22.99);
form.RANGE3.value= round(x*x*23) + "-" + round(x*x*24.99);
form.RANGE4.value= round(x*x*25) + "-" + round(x*x*29.99);
form.RANGE5.value= ">" + round(x*x*30);
form.bmi.value= round(y/x/x);
}
function reset_it(form) {
form.HT_m.value="";
form.WT_kg.value="";
form.bmi.value="";
form.RANGE1.value="";
form.RANGE2.value="";
form.RANGE3.value="";
form.RANGE4.value="";
form.RANGE5.value="";
}
function alrt_msg(entry,low,high,prompt) {
prompt=prompt+" 你所輸入數值: "+entry.value;
var scratch=entry.value;
for (var i=0;i<scratch.length;i++) {
var letter=scratch.substring(i,i+1);
if ((letter<"0" || "9"<letter) && letter!='.') {
alert(prompt);
return false;
}
}
var errtst=parseFloat(scratch)
if (errtst<low || high<errtst) {
alert("對不起. "+prompt+ " ,不在計算範圍內"
+"(從 "+low+" 到 "+high+"!)");
return false;
}
entry.value=scratch;
return true;
}
//-->
</script>
<div align="center">
<form method="POST">
<div align="center"><center>
<table CELLSPACING="0" BORDER="2" CELLPADDING="2" WIDTH="600" bordercolor="#808080" bordercolorlight="#FFFF00">
<tr>
<td align="center" valign="top" bgcolor="#FFFF75"><font face="標楷體" color="#ff0000" size="4">請填寫身高體重:</font><br><font face="Arial" color="#ff0000" size="4">(Enter Height & Weight)</font></td>
<td align="center" valign="top" bgcolor="#ffffd0"><font face="標楷體" color="#ff0000" size="4">BMI 報告</font><br><font face="Arial" color="#ff0000" size="4">(BMI Report)</font></td>
</tr>
<tr>
<td align="center" rowspan="2" bgcolor="#FFFF75">
<font face="標楷體" color="#ff0000" size="3">身高</font><font face="Arial" color="#ff0000" size="4">(Height):</font>
<input type="text" size="6" name="HT_m" onchange="test_it(this)"><font face="Arial" color="#ff0000" size="2">m</font><p>
<font face="標楷體" color="#ff0000" size="3">體重</font><font face="Arial" color="#ff0000" size="4">(Weight):</font>
<input type="text" size="6" name="WT_kg" onchange="test_it(this)"><font face="Arial" color="#ff0000" size="2">kg</font>
</td>
<td align="center" bgcolor="#ffffd0">
<font face="Arial" color="#ff0000" size="2">Classification For This Height Group in adult Asian</font>
<table CELLSPACING="0" BORDER="2" CELLPADDING="2" WIDTH="400" bordercolor="#808080" bordercolorlight="#FFFF00">
<tr>
<td align="center" valign="top" bgcolor="#b0b0ff"><font face="標楷體" color="#ff0000" size="2">組別</font><br><font face="Arial" color="#ff0000" size="2">(Class)</font></td>
<td align="center" valign="top" bgcolor="#b0b0ff"><font face="標楷體" color="#ff0000" size="2">體重</font><br><font face="Arial" color="#ff0000" size="2">(Weight)(kg)</font></td>
<td align="center" valign="top" bgcolor="#b0b0ff"><font face="Arial" color="#ff0000" size="2">BMI<br>(kg/m.m)</font></td>
<td align="center" valign="top" bgcolor="#b0b0ff"><font face="標楷體" color="#ff0000" size="2">危險</font><br><font face="Arial" color="#ff0000" size="2">(Risk)*</font></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#b0ffb0"><font face="標楷體" color="#ff0000" size="2">過輕</font><br><font face="Arial" color="#ff0000" size="2">Underweight</font></td>
<td align="center" valign="top" bgcolor="#b0ffb0"><input type="text" size="10" name="RANGE1"></td>
<td align="center" valign="top" bgcolor="#b0ffb0"><font face="Arial" color="#ff0000" size="2"><18.5</font></td>
<td align="center" valign="top" bgcolor="#b0ffb0"><font face="Arial" color="#ff0000" size="2">Low Risk</font></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#d0ffd0"><font face="標楷體" color="#ff0000" size="2">正常體重</font><br><font face="Arial" color="#ff0000" size="2">Normal Weight</font></td>
<td align="center" valign="top" bgcolor="#d0ffd0"><input type="text" size="10" name="RANGE2"></td>
<td align="center" valign="top" bgcolor="#d0ffd0"><font face="Arial" color="#ff0000" size="2">18.5 - 22.9</font></td>
<td align="center" valign="top" bgcolor="#d0ffd0"><font face="Arial" color="#ff0000" size="2">Average Risk</font></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#ffffd0"><font face="標楷體" color="#ff0000" size="2">過重</font><br><font face="Arial" color="#ff0000" size="2">Overweight</font></td>
<td align="center" valign="top" bgcolor="#ffffd0"><input type="text" size="10" name="RANGE3"></td>
<td align="center" valign="top" bgcolor="#ffffd0"><font face="Arial" color="#ff0000" size="2">23 - 24.9</font></td>
<td align="center" valign="top" bgcolor="#ffffd0"><font face="Arial" color="#ff0000" size="2">Increased Risk</font></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#ffd0d0"><font face="標楷體" color="#ff0000" size="2">肥胖 I</font><br><font face="Arial" color="#ff0000" size="2">Obese I</font></td>
<td align="center" valign="top" bgcolor="#ffd0d0"><input type="text" size="10" name="RANGE4"></td>
<td align="center" valign="top" bgcolor="#ffd0d0"><font face="Arial" color="#ff0000" size="2">25 - 29.9</font></td>
<td align="center" valign="top" bgcolor="#ffd0d0"><font face="Arial" color="#ff0000" size="2">Moderate Risk</font></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#ffa0a0"><font face="標楷體" color="#ff0000" size="2">肥胖 II</font><br><font face="Arial" color="#ff0000" size="2">Obese II</font></td>
<td align="center" valign="top" bgcolor="#ffa0a0"><input type="text" size="10" name="RANGE5"></td>
<td align="center" valign="top" bgcolor="#ffa0a0"><font face="Arial" color="#ff0000" size="2">30 & above</font></td>
<td align="center" valign="top" bgcolor="#ffa0a0"><font face="Arial" color="#ff0000" size="2">Severe Risk</font></td>
</tr>
</table>
<font face="Arial" color="#ff0000" size="2">Risk(危險)* 指的是肥胖造成患上疾病的風險<br>如高血壓、糖尿病等</font>
</td>
</tr>
<tr>
<td align="center" bgcolor="#ffffd0" ><font face="Arial" color="#ff0000" size="3">BMI = </font><input type="text"
size="5" name="bmi" onchange="test_it(this)"><font face="Arial" color="#ff0000" size="3">(kg/m.m)</font></td>
</tr>
<tr>
<td align="center" bgcolor="#FFFF75">
<input type="reset" value="重設" onclick="reset_it(this.form)"></td>
<td align="center" bgcolor="#ffffd0">
<input type="button" value="BMI"
onclick="computeForm(this.form)"></td>
</tr>
</table>
</center></div>
</form>
</div><!--自訂頁面內容結束-->
歡迎光臨 SCLUB免費論壇申請-使用者論壇 (http://joinbbs.net/discuz/) | Powered by Discuz! 7.2 |