<form method="post" action="../Project?number=dx&xkzh=1001"> <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="tabletd2">
<td width="100">许可证号</td>
<td><input type="text" name="xkzh" ></td>
<td width="75" align="center"><input type="submit" name="查询" value="查询" class="bn1" onMouseover="changeButtonStyle(1,this)" onMouseout="changeButtonStyle(0,this)"/></td>
想吧text值(红色部分)传到xkzh=?(蓝色部分)请问怎样实现?
<tr class="tabletd2">
<td width="100">许可证号</td>
<td><input type="text" name="xkzh" ></td>
<td width="75" align="center"><input type="submit" name="查询" value="查询" class="bn1" onMouseover="changeButtonStyle(1,this)" onMouseout="changeButtonStyle(0,this)"/></td>
想吧text值(红色部分)传到xkzh=?(蓝色部分)请问怎样实现?
function submitForm(obj) {
obj.action += "&xkzh=" +obj.xkzh.value;
obj.submit();
}
类似这样的函数
<tr class="tabletd2">
<td width="100">许可证号<input type="hidden" name="number" value="dx" /> </td>
<td> <input type="text" name="xkzh" > </td>
<td width="75" align="center"> <input type="submit" name="查询" value="查询" class="bn1" onMouseover="changeButtonStyle(1,this)" onMouseout="changeButtonStyle(0,this)"/> </td>这样提交后在servlet中就可以直接把值接下来了
try{
String xkzh=request.getParameter("xkzh");//许可证号
System.out.println("servlet's xkzh="+xkzh);我的SERVLET是这样写的,后台显示是NULL。。