MyEclipse------黑科技

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

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

 

posted @ 2016-03-29 22:14  玉天恒  阅读(135)  评论(0编辑  收藏  举报