======多条记录不用多个表单用一个隐藏域的方法
<form action="add.do" name="f1" method="post">
firstnum : <input type="text" name="firstnum"/><br/>
second : <input type="text" name="secondnum"/><br/>
<input type="button" value="+" οnclick="check('add')">
<input type="button" value="-" οnclick="check('diff')">
<input type="button" value="*" οnclick="check('ride')">
<input type="button" value="/" οnclick="check('div')">
<input type="hidden" name="method">
</form> </body>
<script type="text/javascript">
function check(tag)
{
//动态设置隐藏域的值
document.f1.elements["method"].value=tag;
f1.submit();
}
</script>