<body><script language=\"vbscript\">
sub a()
f1.t1.vaule=f1.t1.vaule & \"1\"
end sub
sub b()
f1.t1.vaule=f1.t1.vaule & \"2\"
end sub
sub c()
f1.t1.vaule=f1.t1.vaule & \"3\"
end sub
sub d()
f1.t1.vaule=f1.t1.vaule & \"4\"
end sub
sub e()
f1.t1.vaule=f1.t1.vaule & \"5\"
end sub
sub f()
f1.t1.vaule=f1.t1.vaule & \"6\"
end sub
sub g()
f1.t1.vaule=f1.t1.vaule & \"7\"
end sub
sub h()
f1.t1.vaule=f1.t1.vaule & \"8\"
end sub
sub i()
f1.t1.vaule=f1.t1.vaule & \"9\"
end sub
sub j()
f1.t1.vaule=f1.t1.vaule & \"0\"
end sub
sub k()
f1.t1.vaule=f1.t1.vaule & \"+\"
end sub
sub l()
f1.t1.vaule=f1.t1.vaule & \"-\"
end sub
sub m()
f1.t1.vaule=f1.t1.vaule & \"*\"
end sub
sub n()
f1.t1.vaule=f1.t1.vaule & \"/\"
end sub
sub cr()
f1.t1.value=\"\"
end sub
sub compute()
f1.t1.value=eval(f1.t1.value)
end sub
</script>
<form name=\"f1\">
<div align=\"center\">
<table width=\"200\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td colspan=\"4\" align=\"center\">青蛙计算机</td>
</tr>
<tr>
<td colspan=\"4\"><div align=\"center\">
<input type=\"text\" name=\"t1\">
</div></td>
</tr>
<tr>
<td><div align=\"center\">
<input type=\"button\" value=\" 1 \" name=\"v1\" onClick=\"sub a()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" 2 \" name=\"v2\" onClick=\"sub b()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" 3 \" name=\"v3\" onClick=\"sub c()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" + \" name=\"plus\" onClick=\"sub k()\">
</div></td>
</tr>
<tr>
<td><div align=\"center\">
<input type=\"button\" value=\" 4 \" name=\"v4\" onClick=\"sub d()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" 5 \" name=\"v5\" onClick=\"sub e()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" 6 \" name=\"v6\" onClick=\"sub f()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" - \" name=\"minu\" onClick=\"sub l()\">
</div></td>
</tr>
<tr>
<td><div align=\"center\">
<input type=\"button\" value=\" 7 \" name=\"v7\" onClick=\"sub g()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" 8 \" name=\"v8\" onClick=\"sub h()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" 9 \" name=\"v9\" onClick=\"sub i()\">
</div></td>
<td><div align=\"center\">
<input type=\"button\" value=\" * \" name=\"mult\" onClick=\"sub m()\">
</div></td>
</tr>
<tr>
<td colspan=\"2\"><div align=\"center\">
<input type=\"button\" value=\" = \" name=\"eqal\" onClick=\"compute()\">
</div></td>
<td><input type=\"button\" value=\" CR \" name=\"cr\" onClick=\"crt()\"></td>
<td><div align=\"center\">
<input type=\"button\" value=\" \ \" name=\"divi\" onClick=\"sub n()\">
</div></td>
</tr>
</table>
</div>
</form>
</body>
</html>
[此贴子已经被作者于2006-3-10 13:44:02编辑过]