日期:2014-05-16 浏览次数:20648 次
创建文件:C%3ADocuments+and+SettingsAll+UsersApplication+DataVMware
创建文件:C:Documents and SettingsAll UsersApplication DataVMware
@RequestMapping(value="/viewwindow/ajax/{practicelogid}")
@ResponseBody
public String viewWindowAjax(@PathVariable Long practicelogid,HttpServletResponse response){
//TargetresultlogManager targetresultlogManager = new TargetresultlogManager();
Targetresultlog targetresultlog = targetresultlogManager.getLatestTargetresultlog();
String json = "{";
try {
json += "type:\"" + URLEncoder.encode(Constants.SCORENORM_TYPE.get(targetresultlog.getType()),"UTF-8") + "\",";
//json += "type:你好\"" + Constants.SCORENORM_TYPE.get(targetresultlog.getType()) + "\",";
json += "detail:\"" + URLEncoder.encode(targetresultlog.getDetail(),"UTF-8") + "\"}";
//json += "detail:\"" + targetresultlog.getDetail() + "\"}";
} catch (Exception e) {
e.printStackTrace();
}
response.setContentType("text/xml;charset=UTF-8");
//response.setCharacterEncoding("UTF-8");
response.setHeader("Cache-Control", "no-cache");
//model.addAttribute("practicelogid", practicelogid);
return json;
}
function doit()
{
var xmlhttp;
var result;
if (window.XMLHttpRequest)
{
xmlhttp = new XMLHttpRequest();
}
else
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function ()
{