I use this js function to submit my form.
function updateAction(obj,tableName){
inputs=obj.parentNode.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("input");
newValues="";
for(i=0;i<inputs.length;i++){
newValues+=inputs[i].value+",";
}
obj.parentNode.parentNode.parentNode.parentNode.parentNode.action="SimpleServlet?action=update&tableName="+tableName+"&newValue="+newValues;
obj.parentNode.parentNode.parentNode.parentNode.parentNode.submit();
}
and the action of form has correctly been changed to
"http://localhost:8081/SimpleWeb/SimpleServlet?action=delete&tableName=stude…01199203110000,200301,%E5%85%83%E5%AE%9D,%E7%94%B7,3,yb,424551199104010000,"
and in my servlet
String action=(String)request.getAttribute("action");
String tableName=(String)request.getAttribute("tableName");
System.out.print(request.getAttribute("tableName"));
System.out.print(request.getAttribute("action"));
System.out.print(request.getAttribute("newValue"));
String[] newValues=((String)request.getAttribute("newValue")).split(",");
but they are still null,why?