调用jquery 方法$.get(url, null, function(data) {})怎么在身体struts2中使用 我调用jquery 方法$.get(url, null, function(data) {}),以前是在servlet中的public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException接收,现在升级使用struts2了,不用servlet了,那怎么使用呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 页面参数 <input type="text" value="" id="fwxz" name=""> <input type="text" value="<%=basepath%>" id="basepaths" name=""> var houselocated = $("#fwxz").val(); var obj ; var path = $("#basepaths").val(); $.ajax({ url: path+"allpage/addBasehouseinfoAction.action", type: "post" , processData: false, data: "houselocated="+houselocated+"&aa=kk, success: function(data){ $("#content").prepend(data); } }); <div id = "content"></div>action接收为 HttpServletRequest request = ServletActionContext.getRequest(); String houselocated= request.getParameter("houselocated"); String aa= request.getParameter("aa"); HttpServletResponse response =ServletActionContext.getResponse();response.setContentType("text/html; charset=utf-8");PrintWriter out = response.getWriter();out.print("<td>成功<td>"); 急!!!莫名其妙的问题 MapXtreme for Java 坐标转换 commons.beanutils.ConversionException: No value specified struts 窗口问题 JBoss注册为系统服务后,外部ip不能访问的问题 一个struts标签问题 string转化成xml解析时乱码 连接池容量问题 在实体bean中,能否返回HashMap之类值? 队列问题 m.mysql.jdbc.CommunicationsException velocity模板获取request中的值?
<input type="text" value="<%=basepath%>" id="basepaths" name="">
var houselocated = $("#fwxz").val();
var obj ;
var path = $("#basepaths").val();
$.ajax({
url: path+"allpage/addBasehouseinfoAction.action",
type: "post" ,
processData: false,
data: "houselocated="+houselocated+"&aa=kk,
success: function(data){ $("#content").prepend(data);
} });
<div id = "content"></div>
action接收为 HttpServletRequest request = ServletActionContext.getRequest();
String houselocated= request.getParameter("houselocated");
String aa= request.getParameter("aa");
HttpServletResponse response =ServletActionContext.getResponse();
response.setContentType("text/html; charset=utf-8");
PrintWriter out = response.getWriter();
out.print("<td>成功<td>");