(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id==\
return if
(event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor for(i=0;i cs[i].style.backgroundColor=\} } function clickto(){ source=event.srcElement; if (source.tagName==\return; while(source.tagName!=\source=source.parentElement; source=source.parentElement; cs = source.children; //alert(cs.length); if (cs[1].style.backgroundColor!=clickcolor&&source.id!=\ for(i=0;i cs[i].style.backgroundColor=clickcolor; } else for(i=0;i cs[i].style.backgroundColor=\} } 20 老婆店母婴网(www.laopodian.com)小型电子商务网站 21 int totalPage = 1; int totalrecord = 0; try{ Class.forName(\} catch(ClassNotFoundException ce){ out.println(ce.getMessage()); } 22 老婆店母婴网(www.laopodian.com)小型电子商务网站 try{ String strDirPath=pageContext.getServletContext().getRealPath(\; strDirPath=strDirPath.replace('\\\\','/'); String strUrl=\Access Driver (*.mdb)};DBQ=\ conn=DriverManager.getConnection(strUrl) ; stmt=conn.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); //算出总行数 strSQL = \ rs = stmt.executeQuery(strSQL); if (rs.next()) totalrecord = rs.getInt(\ //输出记录 strSQL = \ rs = stmt.executeQuery(strSQL); if(totalrecord % PageSize ==0)// 如果是当前页码的整数倍 totalPage = totalrecord / PageSize; else // 如果最后还空余一页 totalPage = (int) Math.floor( totalrecord / PageSize ) + 1; if(totalPage == 0) totalPage = 1; if(request.getParameter(\|| request.getParameter(\ Page = 1; else try { Page = Integer.parseInt(request.getParameter(\ } 23 <% Connection conn = null; Statement stmt = null; ResultSet rs = null; String strSQL = \int PageSize =2; int Page = 1;