📄 index_jsp.java
字号:
out.write("</tr>\r\n ");
out.write("</table>\r\n ");
out.write("<table width=\"100%\" height=\"76\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td width=\"361\" background=\"images/shop_28.gif\"> ");
out.write("</td>\r\n ");
out.write("<td width=\"46\" height=\"35\" background=\"images/shop_29.gif\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td colspan=\"2\">\r\n\t\t\t\t");
while (rs_new.next()){
new_ID=rs_new.getInt(1);
new_goodsname=rs_new.getString(2);
new_nowprice=rs_new.getFloat(3);
new_introduce=rs_new.getString(4);
new_picture=rs_new.getString(5);
if(new_introduce.length()>20){
new_introduce=new_introduce.substring(0,20)+"...";
}
out.write("\r\n\t\t\t\t");
out.write("<table width=\"100%\" height=\"79\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tableBorder_B_dashed\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td width=\"33%\" height=\"95\" rowspan=\"4\" align=\"center\">");
out.write("<img src=\"images/goods/");
out.print(new_picture);
out.write("\" width=\"99\" height=\"61\">");
out.write("</td>\r\n ");
out.write("<td width=\"67%\">");
out.print(new_goodsname);
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td>单价:");
out.print(new_nowprice);
out.write("(元) ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td>");
out.print(new_introduce);
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td>");
out.write("<a href=\"goods_detail.jsp?ID=");
out.print(new_ID);
out.write("\">查看详细信息");
out.write("</a> ");
out.write("<a href=\"cart_see.jsp\">购买");
out.write("</a>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>\r\n\t\t\t\t");
}
out.write("\t\t\t\t");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("<td width=\"31%\" valign=\"top\">");
out.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td>");
out.write("<img src=\"images/shop_20.gif\" width=\"201\" height=\"80\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"90\" valign=\"top\">");
out.write("<table width=\"100%\" height=\"40\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
int ID_superType=0;
String superType="";
int m=1;
while(rs_superType.next()){
ID_superType=rs_superType.getInt(1);
superType=rs_superType.getString(2);
String sql="select * from V_Type where ID="+ID_superType;
ResultSet rs_subType=conn.executeQuery(sql);
String subType="";
int subID=0;
//获取记录总数
rs_subType.last();
int subType_RC=rs_subType.getRow();
rs_subType.first();
out.write("\r\n ");
out.write("<tr>\r\n\t\t\t");
out.write("<td>\r\n\t\t\t\t\t");
if(subType_RC<=0){
out.write("\r\n\t\t\t\t\t ");
out.write("<img src=\"images/jian_null.gif\" width=\"38\" height=\"16\" border=\"0\">\r\n\t\t\t\t\t");
out.print(superType);
out.write("\r\n\t\t\t\t\t");
}else{
out.write("\r\n\t\t\t\t\t ");
out.write("<a href=\"Javascript:ShowTR(img");
out.print(m);
out.write(",OpenRep");
out.print(m);
out.write(")\">");
out.write("<img src=\"images/jia.gif\" border=\"0\" alt=\"展开\" id=\"img");
out.print(m);
out.write("\">");
out.write("</a>\r\n\t\t\t\t\t");
out.write("<a href=\"Javascript:ShowTR(img");
out.print(m);
out.write(",OpenRep");
out.print(m);
out.write(")\">");
out.print(superType);
out.write("</a>\r\n\t\t\t\t\t");
}
out.write("\r\n ");
out.write("</td>\r\n\t\t\t\t");
if (subType_RC>0){
out.write("\r\n\t\t\t ");
out.write("<tr id=\"OpenRep");
out.print(m);
out.write("\" style=\"display:none;\">\r\n\t\t\t ");
out.write("<td colspan=\"6\">\r\n\t\t\t\t");
do{
subType=rs_subType.getString(3);
subID=rs_subType.getInt(4);
out.write("\r\n\t\t\t ");
out.write("<table width=\"100%\" border=\"0\" cellspacing=\"-2\" cellpadding=\"-2\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"25\" align=\"center\">");
out.write("<table width=\"90%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n ");
out.write("<tr onMouseOver=\"this.style.background='#EEEEEE'\" onMouseOut=\"this.style.background=''\">\r\n ");
out.write("<td width=\"15%\"> ");
out.write("</td>\r\n ");
out.write("<td width=\"10%\" align=\"center\">");
out.write("<img src=\"images/folder.gif\" width=\"16\" height=\"16\" border=\"0\"> ");
out.write("</td>\r\n ");
out.write("<td width=\"75%\">");
out.write("<a href=\"type.jsp?Type=");
out.print(subID);
out.write("\">");
out.print(subType);
out.write("</a>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>\r\n\t\t\t\t ");
m++; //注意,该条语句一定不能少
}while(rs_subType.next());
out.write("\r\n\t\t\t ");
out.write("</td>\r\n\t\t\t ");
}
out.write("\r\n\t\t\t ");
out.write("</tr>\r\n");
out.write("<script language=\"javascript\">\r\nShowTR(img1,OpenRep1) //设置第1个结点为展开状态\r\nfunction ShowTR(objImg,objTr){\r\n\tif(objTr.style.display == \"\"){\r\n\t\tobjTr.style.display = \"none\";\r\n\t\tobjImg.src = \"images/jia.gif\";\r\n\t\tobjImg.alt = \"展开\";\r\n\t}else{\r\n\t\tobjTr.style.display = \"\";\r\n\t\tobjImg.src = \"images/jian.gif\";\r\n\t\tobjImg.alt = \"折叠\";\r\n\t}\r\n}\r\n");
out.write("</script>\r\n");
}
out.write("\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"30\" valign=\"bottom\">");
out.write("<img src=\"images/shop_31.gif\" width=\"201\" height=\"30\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>\r\n ");
out.write("<table width=\"100%\" height=\"119\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"70\" align=\"center\">");
out.write("<img src=\"images/ggzs.gif\" width=\"150\" height=\"60\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"70\" align=\"center\">");
out.write("<img src=\"images/ggzs.gif\" width=\"150\" height=\"60\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"70\" align=\"center\">");
out.write("<img src=\"images/ggzs.gif\" width=\"150\" height=\"60\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("</tr>\r\n");
out.write("</table>\r\n");
out.write("<table width=\"790\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td>");
out.write("<table width=\"100%\" height=\"78\" border=\"0\" align=\"center\" cellpadding=\"-2\" cellspacing=\"-2\">\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"13\" colspan=\"5\">");
out.write("<div align=\"center\">\r\n ");
out.write("<hr width=\"100%\" size=\"1\">\r\n ");
out.write("</div>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td width=\"124\" height=\"13\"> ");
out.write("</td>\r\n ");
out.write("<td height=\"13\" colspan=\"3\" align=\"center\">Go购电子商城客户服务热线:0431-4978981,4978982 传真:0431-4972266");
out.write("</td>\r\n ");
out.write("<td width=\"141\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td height=\"15\" colspan=\"2\"> ");
out.write("</td>\r\n ");
out.write("<td width=\"464\" valign=\"bottom\" align=\"center\"> CopyRight © 2005 www.mingrisoft.com 吉林省明日科技有限公司");
out.write("</td>\r\n ");
out.write("<td colspan=\"2\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td colspan=\"2\"> ");
out.write("</td>\r\n ");
out.write("<td align=\"center\">本站请使用IE6.0或以上版本 1024*768为最佳显示效果");
out.write("</td>\r\n ");
out.write("<td colspan=\"2\"> ");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr bgcolor=\"#cccccc\">\r\n ");
out.write("<td height=\"8\" colspan=\"2\">");
out.write("</td>\r\n ");
out.write("<td height=\"8\" align=\"center\">");
out.write("</td>\r\n ");
out.write("<td height=\"8\" colspan=\"2\">");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("</table>");
out.write("</td>\r\n ");
out.write("</tr>\r\n");
out.write("</table>\r\n");
out.write("</td>\r\n");
out.write("</tr>\r\n");
out.write("</table>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
conn.close();
out.write("\r\n");
} catch (Throwable t) {
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -