日期:2014-05-18 浏览次数:20857 次
<button class="btn" name="btnGet" id="btnGet" onclick="clickbtnGet();"><span class="icon icon-ok"> </span>详情</button>
function clickbtnGet(){
alert("参数:");
$.ajax({
url:"/MyStoraneManage/stockIn_ajaxLoad.action";
type:"POST";
data:{id:$("#in_id").val()};
dataType:"json";
success:function(data){alert(data)};
});
}
public String ajaxLoad(){
System.out.println("执行到ajax方法了");
HttpServletRequest request= (HttpServletRequest)ServletActionContext.getRequest();
String id= request.getParameter("id");
this.estockin=stockInManager.queryById(Integer.parseInt(id));//estockin是一个实体类对象
JSONObject js=JSONObject.fromObject(estockin);
result=js.toString();
return "success";
}