【发布时间】:2015-01-01 10:57:44
【问题描述】:
Struts2 to ajax json response can we set it on jsp first and display jsp as response inside
ajax 成功 这是在 jquery 中使用动态值编写 jsp/html 标记变得非常痛苦的代码,所以有什么方法可以在响应后在 jsp 中显示 html 并返回 jsp 或显示在 function(response){ }.
$.post("add_cmt?content1="+comment_text+"&postupload_id1="+getpID, {
}, function(response){
$('#CommentPosted'+getpID).prepend("<div>"+'<img src="images/'+comment_userid+"/"+comment_album+"/"+comment_pic +'" width="50" height="50" />'+"<b>"+comment_name+"</b>"+" "+comment_text+"<br/>"+"few Seconds ago"+"</div>");
});
【问题讨论】:
标签: javascript jquery ajax jsp struts2