?? a_index.jsp
字號(hào):
<%@ page contentType="text/html; charset=GBK" import="java.util.List,mrgf.hibernate.*,mrgf.other.*" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<link rel="stylesheet" href="css/style.css">
<head>
<title>
index
</title>
</head>
<body bgcolor="#ffffff" topmargin="0">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="126" background="image/other/hortation.jpg"> </td>
</tr>
<tr align="right">
<td height="22" background="image/other/new_merchandise.jpg"><a href="all_new_merchandise.do">More>></a> </td>
</tr>
<tr>
<td height="493" background="image/other/background_index.jpg" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" height="10"></td>
</tr>
<%
String hql = "from MerchandiseInfo where head='y'";
List merchandises = new Hibernate().query(hql);
int l=0;
for(int i=0;i<3;i++){
%>
<tr>
<td colspan="2" height="5"></td>
</tr>
<tr height="154" align="center">
<%
if(l<merchandises.size()){
MerchandiseInfo info=(MerchandiseInfo)merchandises.get(l);
%>
<td width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="23">
<td width="50%" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr align="center">
<td><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>" class="style2"><img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="112" height="102"></a></td>
</tr>
</table>
</td>
<td width="50%" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td>價(jià)格:<%=info.getPrice() %></td>
</tr>
<tr>
<td>簡(jiǎn)介:<%=info.getIntroduce() %></td>
</tr>
</table>
</td>
</tr>
<tr height="23">
<td align="center"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>" class="style2"><%=info.getName() %></a></td>
<td align="right"><a href="sonSort.do?fatherId=<%=info.getSortId() %>&requestPage=/index.jsp" class="style2">More>></a> </td>
</tr>
</table></td>
<%
}
l=l+1;
%>
<%
if(l<merchandises.size()){
MerchandiseInfo info=(MerchandiseInfo)merchandises.get(l);
%>
<td width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr height="23">
<td width="50%" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr align="center">
<td><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>" class="style2"><img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="112" height="102"></a></td>
</tr>
</table>
</td>
<td width="50%" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td>價(jià)格:<%=info.getPrice() %></td>
</tr>
<tr>
<td>簡(jiǎn)介:<%=info.getIntroduce() %></td>
</tr>
</table>
</td>
</tr>
<tr height="23">
<td align="center"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>" class="style2"><%=info.getName() %></a></td>
<td align="right"><a href="sonSort.do?fatherId=<%=info.getSortId() %>&requestPage=/index.jsp" class="style2">More>></a> </td>
</tr>
</table></td>
<%
}
l=l+1;
%>
</tr>
<%
}
%>
</table></td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -