ajax.js代码:
url正确,已经进入到对应的aciton并执行有结果,但是 xmlHttp.onreadyStatechange=function() 这句一直未执行,我在函数里写了alert并未跳出,请大神看看娜丽有问题~~
action的代码:
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws JSONException {
ManagerForm managerForm = (ManagerForm) form;// TODO Auto-generated method stub
List signList=null;
SignInService signService=(SignInService)getBean("signInService");
signList=signService.findAll(signIn);
JSONObject result = new JSONObject();
result.put("signlist", signList);
request.setAttribute("ajaxResult", result);
return null;
}
jsp的代码:
<body>
<input type="button" value="查询" onclick="getSignList()" />
</body>