ajax访问后台,获得数据显示DIV,JS获得单元格位置

  index.jsp 正在加载...' //读取数据-------------------------------------------------- ------------- XmlHttp(); xmlHttp.open("GET", "getweb0info.jsp?category="+idx, true); xmlHttp.onreadystatechange = getinfo; xmlHttp.send(null); //读取数据-------------------------------------------------- ------------- document.getElementById(idx).οnmοuseοut=closem; document.getElementById(idx).innerHTML=divstr; } } //回调函数 function getinfo() { //alert(xmlHttp.responseText.Trim()) //alert(xmlHttp.readyState) var tmptext=""; if (xmlHttp.readyState == 4) { tmptext=xmlHttp.responseText.Trim(); if(tmptext==""){ tmptext=" 获取数据错误!" } } else { tmptext=" 获取数据错误!" } //alert(tmptext) document.getElementById("show"+categorycode).inner HTML=tmptext; } // --> getweb0info.jsp '1' AND ltinfo.otherprimory'3' "+ "AND groupuserrel.groupCode=groupsubjectactrel.GROUP_ID " + "AND (groupuserrel.userId=? OR groupuserrel.userId='guest') "+ "AND groupsubjectactrel.CODE LIKE '"+category+"%' "+ "and ltinfo.APP_ID='"+appID+"' "+ "ORDER BY createtime DESC LIMIT 5 "; Vector c_tmpV = new Vector(); Connection c_conn=c_dbPool.getConnection(); if(c_conn==null) { System.out.println(c_dbclass.getMsg()); return; } try{ //System.out.println(c_sql); c_tmpV = c_dbclass.doQuery(c_conn,c_sql,null,new String[]{userID}); //c_tmpV=c_dbclass.doQuery(c_conn,c_sql); }catch(Exception e) {}finally{ if(c_conn!=null) { try{ c_conn.close(); }catch(Exception e){} } } if(c_tmpV == null){ System.out.println(c_dbclass.getMsg()); } SimpleDateFormat sDateFormat=new SimpleDateFormat("yyyy-MM-dd"); String today = sDateFormat.format(new Date());//今天 java.util.Date pre_date = new java.util.Date(System.currentTimeMillis()- 1*24*3600*1000); String pre_time = sDateFormat.format(pre_date);//昨天 for(int i=0;i"; c_new[c]="new"; }else if(createtime.equals(pre_time)) { image=""; c_new[c]="new"; } String miid = pub.trimNull((String)tmpH.get("id")); String categorycode = pub.trimNull((String)tmpH.get("category")); String titleall=title; title=title.length()>15?title.substring(0,13)+"..." :title; %> &category=" title=''> [] 暂时没有数据!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值