javascript:
alert("tid: "+tid);
xmlHttp.send("name="+tname);
xmlHttp.send("pwd="+pwd);
xmlHttp.send("tid="+tid); // 为什么tid传过去的是null呢?-------------------------------------------------------------
struts action:
System.out.println("this is admin manager action 's modify");
System.out.println("ctid: " +request.getParameter("tid"));-------------------------------------------------------------结果:
this is admin manager action 's modify
name: 06020041
pwd: 789
ctid: null
alert("tid: "+tid);
xmlHttp.send("name="+tname);
xmlHttp.send("pwd="+pwd);
xmlHttp.send("tid="+tid); // 为什么tid传过去的是null呢?-------------------------------------------------------------
struts action:
System.out.println("this is admin manager action 's modify");
System.out.println("ctid: " +request.getParameter("tid"));-------------------------------------------------------------结果:
this is admin manager action 's modify
name: 06020041
pwd: 789
ctid: null
xmlHttp.open("GET","/chooseCourse_web/amt.do?
method=modify&name="+tname+"&pwd="+pwd+",true); 正确的写法:
xmlHttp.open("GET","/chooseCourse_web/amt.do?
method=modify&name="+tname+"&pwd="+pwd+"&tid="+tid+"",true); 但我在已写上了:
xmlHttp.send("tid="+tid); //为什么还要写这句? 已在URL中传参了.
xmlHttp.send("name="+tname); //为什么还要写这句? ajax中人真另人疑惑!
xmlHttp.send("pwd="+pwd); //为什么还要写这句? 再传参会不会多此一举.请问各位高手, 有什么改善的方法?