自动计算器(+,-,*,/)
<form method="post" oninput="o.value = parseInt(a.value) + parseInt(b.value)">
<input type="number" name="a">+<input type="number" name="b">=
<output name="o"></output><br>
</form>
在<input type="button">中传递参数方法
index.jsp
<input type="button" value="提交" onclick="window.location='servlet/downfile?info=hello'">
servlet/receive.java
String info=request.getParameter("info");
System.out.print(info);