在表单中获取一个隐藏变量,并像这样使用它。
<form name="frm" method="post" action=""><input type="hidden" name="hdnbt" /><input type="button" name="bt" value="gi" onclick="{document.frm.hdnbt.value=this.value;document.frm.submit();}" /></form>现在,在servlet中,
String gi =request.getParameter("hdnbt");System.out.print("button value" +gi);


