function GetBusInfo(lineno,busno){
//这里面写的什么,看里面是否有拼字符串的语句,比如
document.getElementById("haha").onclick=new Function("aaaa('"+lineno+"')")
//注意那两个单引号
}
//这里面写的什么,看里面是否有拼字符串的语句,比如
document.getElementById("haha").onclick=new Function("aaaa('"+lineno+"')")
//注意那两个单引号
}
解决方案 »
- ajax获取返回值问题
- 有喜欢Prototype的朋友不?分享一个prototype写的俄罗斯方块
- 关于页面指定内容导出到word的问题
- 要统计在线人数,请问如何在关闭浏览器调用注销登录用户的代码?
- 点击后其改变所在的单元格背景图片
- 框架结构页面用上My97DatePicker.htm的日历就经常出现 无法打开站点,已终止操作?
- 请各位大侠帮忙看看这段JavaScript具体哪里出错了!
- 如何实现向四个方向改变层的大小?
- 一个有关浏览器的问题,高手必进!
- 使用WebStorm8调试js选择IE作为浏览器无效
- options.add(opt , index)后,原options中的各项的index如何变化?
- 求替换内容中的部分格式的方法,在线等待!
var time = document.getElementById("timepoint"+busno+"").innerHTML;
if(time == ""){
return false;
} var url = "GetMessage.do?action=getbusinfo&line_no="+lineno+"&bus_no="+busno+"&ts=" + new Date().getTime();
createoXMLHttpRequest();
oXMLHttpRequest.onreadystatechange = handleStateChangeGetBusInfo; oXMLHttpRequest.open("GET", url, false); oXMLHttpRequest.send(null);}
//这里面写的什么,看里面是否有拼字符串的语句,比如
document.getElementById("haha").onclick=new Function("aaaa('"+lineno+"')")
//注意那两个单引号
}这个看不懂
}else{
}
}else{
}
}
/*
* Generated Methods
*/ /**
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
// TODO Auto-generated method stub try{
request.setCharacterEncoding("gb2312");
response.setContentType("text/xml;charset=GB2312");
response.setHeader("Cache-Control","no-cache");
String action=(String)request.getParameter("action");
System.out.println(action);
if(action.equals("getshishibusinfo")){
String line_no=(String)request.getParameter("line_no");
response.getWriter().println(BusList.getBusInfo(line_no));
}else if(action.equals("geterrormessage")){
String result = "";
String line_no=(String)request.getParameter("line_no");
result = GetErrorMessage.GetMessage(line_no);
response.getWriter().println(result);
}else if(action.equals("getbusinfo")){
String result = "";
String line_no=(String)request.getParameter("line_no");
String bus_no=(String)request.getParameter("bus_no");
result = GetBusInfoWithAjax.GetBusInfoWithLineNoAndBusNo(line_no,bus_no);
response.getWriter().println(result);
}else if(action.equals("getlineno")){
//GetLineNo getlineno = new GetLineNo();
//response.getWriter().println(getlineno.getLineNo());
response.getWriter().println(GetLineNo.getLineNo());
}
response.getWriter().close();
}catch(Exception ex){
System.out.println(ex.getMessage());
}
return null;
}
}