DWZ 在js中刷新某个navTab

当时的想法是:

  上传一个文件成功后 刷新navTab ,关闭上传文件dialog.

function fileNameBack(args){
  //表单毁掉函数
alertMsg.correct(args["msg"],null);
navTab.reloadFlag("main");//navTab的名称
$.pdialog.closeCurrent();
}
<form action="" method="post" enctype="multipart/form-data" class="pageForm required-validate" onsubmit="return iframeCallback(this, fileNameBack)">

</form>

args是后台返回的json字符串:

  后台方法

    JSONObject resultJson = new JSONObject();
resultJson.put("msg","成功!");
context.sendAsString(resultJson.toString()); public void sendAsString(String s,String... encoding) {
String charset = "UTF-8";
if(encoding.length==1){
charset = encoding[0];
}
response.setContentType("text/html; charset="+charset);
response.setHeader("Cache-control", "no-cache");
response.setCharacterEncoding(charset);
try {
response.getWriter().write(s);
} catch (IOException e) {
throw new RuntimeException("response write json error.info: " + e.getMessage());
}
}
上一篇:Asp.Net MVC 分页、检索、排序整体实现


下一篇:蚂蚁金服ATEC城市峰会上海举行,三大发布迎接金融科技2019