javascript中window.prompt与table连用
<head>
<script type = "text/javascript">
var x,y,z, result;
var x=window.prompt("Enter Name:","");
var y=window.prompt("Enter Weight:","0");
var z=window.prompt("Enter Height:","0");
function input(y,z)
{
return y/(z*z);
}
</script>
</head>
<body>
<Center><b><caption>Calculating MBI</caption></b></center>
<table border=1 width=100%>
<tr><th width=20%> Customer Name </th>
<th width=20%> Weight(KGs) </th>
<th width=20%> Height(Meters) </th>
<th width=20%> BMI </th>
<th width=20%> Status </th>
</tr>
<tr>
<script type="text/javascript">
document.write("<td>");
document.write(x);
document.write("</td>");
document.write("<td>");
document.write(y);
document.write("</td>");
document.write("<td>");
document.write(z);
document.write("</td>");
</tr>
</script>
</body>
输入的数据无法显示在表格