码迷,mamicode.com
首页 > 编程语言 > 详细

SpringMVC返回JS

时间:2015-08-18 18:25:01      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:

@RequestMapping(produces="text/html; charset=UTF-8",value = "/edit.jhtml", method = RequestMethod.POST)
public @ResponseBody
String update(Channel channel, Model model, RedirectAttributes attributes) {
Channel oldChannel = channelService.findById(channel.getId());
oldChannel.setName(channel.getName());
channelService.update(oldChannel);
return "<script>parent.alert(‘修改成功‘);parent.location.reload();</script>";
}

SpringMVC返回JS

标签:

原文地址:http://www.cnblogs.com/yuxinglab/p/4739582.html

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