码迷,mamicode.com
首页 > Web开发 > 详细

$.post()请求 ation请求,jsp获取的处理结果

时间:2015-04-07 11:31:28      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:

	public void write(String content, String charset) {
		getHttpResponse().setCharacterEncoding(charset);
		getHttpResponse().setContentType("text/html;charset=" + charset);
		try {
			getHttpResponse().getWriter().print(content);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

  

	public String syncRes(){
		if (**) {
		    write("操作成功", "UTF-8");
		} catch (IOException e) {
			e.printStackTrace();
		    write("操作失败:"+e.getMessage(), "UTF-8");
		}else {
			write("操作失败:没有传递正确的参数", "UTF-8");	
		}
		return null;
	}

  

function syncRes(){
	if($("#indextemplet").val()==""){
		alert("请选择页面模板");
		selectTemplet($("#siteId").val());
		return false;
	}
	if(confirm("此操作将把模板资源文件复制并覆盖到此站点,确认此操作么?")){		                $.post("site_syncRes.do","site.id="+$("#siteId").val()+"&site.indextemplet="+$("#indextemplet").val(),syncResComplete,"text");
	}
}
function syncResComplete(data){
	alert(data);
}

  

$.post()请求 ation请求,jsp获取的处理结果

标签:

原文地址:http://www.cnblogs.com/a757956132/p/4397585.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!