MyEclipse------黑科技

时间:2022-01-20 13:36:06

自动计算器(+,-,*,/)

<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);