实例介绍
【实例简介】
【实例截图】
【核心代码】
<%@ page language="java"
import="java.util.*,org.itstar.bookshopping.bean.*"
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() "://"
request.getServerName() ":" request.getServerPort()
path "/";
%>
<%
List<BookInfoBean> newlist = (List) request.getAttribute("newlist");
List<BookInfoBean> focuslist = (List) request
.getAttribute("focuslist");
List<BookInfoBean> specillist = (List) request
.getAttribute("specillist");
List<BookInfoBean> sellgoodlist = (List) request
.getAttribute("sellgoodlist");
List<NewsBean> firstnews = (List) request.getAttribute("firstnews");
List<VcommentBean> newcomment = (List) request
.getAttribute("newcomment");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0040)http://www.99read.com/channel/index.html -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>网上书城 :: 阅读改变人生 :: 欢迎加入本土最优秀的读书俱乐部</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META http-equiv=Content-Language content=zh-CN>
<META http-equiv=cache-control content=PRIVATE>
<SCRIPT language=javascript src="css/jqueryj.js" type=text/javascript></SCRIPT>
<SCRIPT language=javascript src="css/global.js" type=text/javascript></SCRIPT>
<LINK media=all href="css/global.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.5726" name=GENERATOR>
<SCRIPT language=javascript
src="css/jqueryj.js"
type=text/javascript></SCRIPT>
<SCRIPT language=javascript
src="css/global.js"
type=text/javascript></SCRIPT>
<LINK media=all href="css/global.css"
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.5726" name=GENERATOR>
<style type="text/css">
<!--
.STYLE2 {color: #CC0000}
-->
</style>
</HEAD>
<body>
<DIV style="CLEAR: right; FLOAT: right; WIDTH: 822px">
<DIV class=panel_wrapper id=panel_content
style="MIN-HEIGHT: 100px; FLOAT: left; MARGIN: 0px; WIDTH: 603px; HEIGHT: 100px">
<DIV style="PADDING-LEFT: 4px">
<TABLE style="OVERFLOW: hidden" cellSpacing=0 cellPadding=0
width=575 align=center border=0>
<TBODY>
<TR>
<TD width=575 background="css/tt_xinshu.gif" height=51>
<TABLE cellSpacing=0 cellPadding=0 width="97%" border=0>
<TBODY>
<TR>
<TD style="HEIGHT: 20px" align=right>
<TABLE cellSpacing=0 cellPadding=0 width="97%" border=0>
<TBODY>
<TR>
<TD align=right height=20>
<A href="books.jsp?url=org.itstar.bookshopping.domain.impl.BookInfoDomainImpl&method=getnewbooks" target=main><IMG height=9
src="css/more.gif" width=36 border=0> </A>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR>
<TD background="css/tt_xinshubac.gif">
<TABLE cellSpacing=0 cellPadding=0 width=560 align=right
border=0>
<DIV class=m>
<DIV class=box-body id=box-body-nb style="HEIGHT: 100%">
<DIV class=changer-seq
style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; MIN-HEIGHT: 180px; FLOAT: none; PADDING-BOTTOM: 5px; PADDING-TOP: 5px; HEIGHT: 100%">
<%
if (newlist != null) {
int temp = 4;
if (newlist.size() < 4) {
temp = newlist.size();
}
for (int i = 0; i < temp-1; i ) {
String imageurl = newlist.get(i).getImageurl();
int bookid = newlist.get(i).getBookid();
%>
<SPAN class=current id=changer-seq-0_0
style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; BACKGROUND-IMAGE: none; PADDING-BOTTOM: 3px; WIDTH: 110px; PADDING-TOP: 3px; HEIGHT: 100%; BACKGROUND-COLOR: white"><a
href="BookInfo.cmd?bookid=<%=bookid%>"><IMG class=imgborder
src="<%=imageurl%>" width=110> </A> </SPAN>
<%
}
}
%>
</DIV>
<%
if (newlist != null) {
int temp = 6;
if (newlist.size() < 6) {
temp = newlist.size();
}
for (int i = 0; i < temp-1; i ) {
String bookname = newlist.get(i).getBookname();
int bookid = newlist.get(i).getBookid();
String content = newlist.get(i).getContent();
%>
<DIV class=changer-body id=changer-body-0_0
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 5px; WIDTH: 556px; LINE-HEIGHT: 18px; PADDING-TOP: 5px; TEXT-ALIGN: left">
<SPAN class=title><A href="BookInfo.cmd?bookid=<%=bookid%>"><%=bookname%></A> </SPAN>
<BR>
<A style="COLOR: #666666" href="BookInfo.cmd?bookid=<%=bookid%>"> 本期打主内容:
<%=content %>...</A>
</DIV>
<%
}
}
%>
</DIV>
</DIV>
</TABLE>
</TD>
</TR>
<TR>
<TD style="HEIGHT: 12px">
<IMG height=12 src="css/tt_xinshubot.gif" width=575>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<!--TVBox.ascx-->
<!--NewProduct.ascx-->
<TABLE class=MidAdv cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR></TR>
</TBODY>
</TABLE>
<!--ImageListHorizontal.ascx-->
<DIV class=box-5 id=box-5-book-rec>
<DIV class=box-header>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR style="HEIGHT: 42px">
<TD class=book-rec></TD>
<TD style="WIDTH: 12px">
<IMG height=42 src="css/t1.gif" width=12>
</TD>
<TD style="BACKGROUND: url(/img/t2.gif); WIDTH: 435px">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0></TABLE>
<span class="title1 STYLE2"> <SPAN class=rec-key-words>
<A href="books.jsp?url=org.itstar.bookshopping.domain.impl.BookInfoDomainImpl&method=getfocusbooks" target="main" target=main>焦点图书</A><A href="books.jsp?url=org.itstar.bookshopping.domain.impl.BookInfoDomainImpl&method=getfocusbooks" target="main" ></A>
</SPAN>
</TD>
<TD style="WIDTH: 12px">
<IMG height=42 src="css/t1.gif" width=12>
</TD>
<TD style="WIDTH: 52px">
<A href="books.jsp?url=org.itstar.bookshopping.domain.impl.BookInfoDomainImpl&method=getfocusbooks" target="main" target=main><IMG height=42 src="css/t3.gif"
width=50> </A>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<!-- 焦点图书div块开始-->
<DIV class=box-body>
<%if(focuslist!=null){
int temp=5;
if(focuslist.size()<5) {
temp = focuslist.size();
}
for(int i=0;i<temp-1;i ) {
String imageurl = focuslist.get(i).getImageurl();
String bookname= focuslist.get(i).getBookname();
float price = focuslist.get(i).getPrice();
int bookid = focuslist.get(i).getBookid();
%>
<DIV class=cate>
<DIV class=cate-img>
<DIV class=cate-name>
<A href="BookInfo.cmd?bookid=<%=bookid%>" target=main><%=bookname %></A>
</DIV>
<DIV class=product>
<SPAN class=img><a
href="BookInfo.cmd?bookid=<%=bookid%>" target=main><img alt="<%=bookname %>"
src="<%=imageurl %>" width=103> </a>
</SPAN>
<SPAN class=title><%= ""%></SPAN>
</DIV>
</DIV>
<DIV class=cate-text>
<UL>
<LI>
单价:¥<%=price %>元
<LI>
<LI>
<a href="BookInfo.cmd?bookid=<%=bookid%>" class="cate-text" style="color: #0F6;">购买</a>
</LI>
</UL>
</DIV>
</DIV>
<%
}
}
%>
</DIV>
<!--焦点图书展现civ结束-->
</DIV>
<!--RecommendBox.ascx-->
<TABLE class=MidAdv cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=554 align=center
border=0></TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<!--ImageListHorizontal.ascx-->
<!--RecommendBox.ascx-->
<TABLE class=MidAdv cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=554 align=center
border=0></TABLE>
</TD>
</TR>
</TBODY>
</TABLE>
<!--ImageListHorizontal.ascx-->
<DIV class=box-5 id=box-5-gift-rec>
<DIV class=box-header>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR style="HEIGHT: 42px">
<TD class=gift-rec></TD>
<TD style="WIDTH: 12px">
<IMG height=42 src="css/t1.gif" width=12>
</TD>
<TD style="BACKGROUND: url(/img/t2.gif); WIDTH: 435px">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="2%"></TD>
<TD width="98%">
<SPAN> </SPAN><SPAN class=rec-key-words><A href="books.jsp?url=org.itstar.bookshopping.domain.impl.BookInfoDomainImpl&method=getsepcialbooks" target="main"
target=main>特价图书</A><A href="books.jsp?url=org.itstar.bookshopping.domain.impl.BookInfoDomainImpl&method=getsepcialbooks" target="main"></A> </SPAN>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
<TD style="WIDTH: 12px">
<IMG height=42 src="css/t1.gif" width=12>
</TD>
<TD style="WIDTH: 52px">
<A href="books.jsp?url=org.itstar.bookshopping.domain.impl.BookInfoDomainImpl&method=getsepcialbooks" target="main" target=main><IMG height=42 src="css/t3.gif"
width=50> </A>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<!-- 精彩新品展现开始 -->
<DIV class=box-body>
<%if(specillist!=null){
int temp=5;
if(specillist.size()<5) {
temp = specillist.size();
}
for(int i=0;i<temp-1;i ) {
String imageurl = specillist.get(i).getImageurl();
String bookname= specillist.get(i).getBookname();
float price = specillist.get(i).getPrice();
int bookid = specillist.get(i).getBookid();
%>
<DIV class=cate>
<DIV class=cate-img>
<DIV class=cate-name>
<A href="BookInfo.cmd?bookid=<%=bookid%>" target=main><%=bookname %></A>
</DIV>
<DIV class=product>
<SPAN class=img><A href="BookInfo.cmd?bookid=<%=bookid%>" target=main><IMG
alt=只有一个人生 src="<%=imageurl %>" width=103> </A> </SPAN>
</DIV>
</DIV>
<DIV class=cate-text>
<UL>
<LI>
单价:¥<%=price %>元
<LI>
<LI>
<a href="BookInfo.cmd?bookid=<%=bookid%>"><div class="book-name" ; style="color: #0F3;">
购买
</div>
</a>
</LI>
</UL>
</DIV>
</DIV>
<%
}
}
%>
</DIV>
<!-- 特价图书展现结束-->
</DIV>
</DIV>
<DIV class=panel_wrapper id=panel_right
style="CLEAR: right; MIN-HEIGHT: 100px; FLOAT: right; WIDTH: 215px; HEIGHT: 100px">
<DIV class=box-6>
<DIV class=box-header>
新闻动态
</DIV>
<DIV class=box-body>
<UL class=text>
<MARQUEE class=topmarqee onmouseover=this.stop()
onmouseout=this.start() scrollAmount=2 scrollDelay=5
direction=up>
<%
if(firstnews!=null) {
int temp=5;
if(firstnews.size()<5) {
temp = firstnews.size();
}
for(int i=0;i<temp-1;i ) {
String content="";
String s = firstnews.get(i).getContent();
int newsid = firstnews.get(i).getNewsid();
if(s.length()<5){
content=s.substring(0,s.length()-1);
}
else{
content=s.substring(0,4);
%>
<LI>
<A href='NewsServlet.cmd?method=queryDetail&newsid=<%=newsid %>' target=main><FONT color=#ff0000><%=content %></FONT>
</A>
<%}}
} %> </MARQUEE>
</UL>
<UL class=imglist>
<LI>
<LI></LI>
</UL>
</DIV>
</DIV>
<!-- 畅销排行开始 -->
<DIV class=box-7 id=cxb>
<DIV class=box-header></DIV>
<DIV class=box-body>
<DIV class=title1>
<SPAN>畅销榜</SPAN><SPAN class=more><A href="books.jsp?url=org.itstar.bookshopping.domain.impl.BookInfoDomainImpl&method=getfocusbooks" target="main"><IMG
height=8 alt=更多排行榜 src="css/more3.gif" width=36> </A> </SPAN>
</DIV>
<DIV class=topbox id=book-top>
<DIV class=top-body>
<DIV class=image-list>
<UL>
<% if(sellgoodlist!=null) {
int temp=5;
if(sellgoodlist.size()<5) {
temp = sellgoodlist.size();
}
for(int i=0;i<temp-1;i ) {
String author = sellgoodlist.get(i).getAuthor();
String bookname = sellgoodlist.get(i).getBookname();
String imageurl = specillist.get(i).getImageurl();
float price = specillist.get(i).getPrice();
int bookid = specillist.get(i).getBookid();
String publisher = specillist.get(i).getPublisher();
%>
<LI>
<A href="#"><SPAN class=p-title><IMG height=18
alt=1 src="css/v1.gif" width=18> <%=bookname %></SPAN> </A><SPAN
class=p-des><SPAN class=p-img><A href="BookInfo.cmd?bookid=<%=bookid%>" target=main><IMG
height=73 alt=围城 src="<%=imageurl %>" width=52>
</A> </SPAN><SPAN class=p-description> <BR>作者:<A
href="#" target=main><SPAN class=author><%= author%></SPAN> </A> <BR>
<A href="#"><%= publisher%></A> </SPAN> </SPAN>
<%
}
}
%>
</UL>
</DIV>
</DIV>
</DIV>
<!-- 畅销排行结束 -->
<!-- 精彩评论开始 -->
<DIV class=box-7 id=jcpl>
<DIV class=box-header></DIV>
<DIV class=box-body>
<DIV class=title1>
<SPAN>精彩评论</SPAN><SPAN class=more><A href="#Space.aspx"
target=main><IMG height=8 src="css/more3.gif" width=36>
</A> </SPAN>
</DIV>
<% if(newcomment!=null) {
int temp=3;
if(newcomment.size()<3) {
temp = newcomment.size();
}
for(int i=0;i<temp-1;i ) {
String bookname = newcomment.get(i).getBookname();
String imageurl = newcomment.get(i).getImageurl();
String title = newcomment.get(i).getTitle();
String comment =newcomment.get(i).getComment();
String username =newcomment.get(i).getUsername();
int id = newcomment.get(i).getId();
%>
<DIV class=comment>
<DIV class=book-name>
<A href="#" target=main>评论:<%=bookname %></A>
</DIV>
<DIV class=user-info>
<A href="#" target=_blank><IMG height=47
src="<%=imageurl %>" width=48> </A><SPAN><A
class=c-title href="#" target=_blank><%=title %></A> <BR>
<SPAN class=by>by</SPAN><A class=c-author href="#"
target=_blank><%= username%></A> </SPAN>
</DIV>
<DIV class=content>
<%=comment %>
..(
<A href='CommentServlet.cmd?method=getonecomment&id=<%=id %>' target=main>全文</A>)
</DIV>
</DIV>
<%
}
}
%>
</DIV>
<DIV class=box-footer></DIV>
</DIV>
<!-- 精彩评论结束 -->
<!--PressList.ascx-->
</DIV>
</DIV>
</DIV>
<DIV class=panel_wrapper id=panel_bottom
style="MIN-HEIGHT: 100px; HEIGHT: 100px">
<!--页面底部Help Table-->
<!--HelpTable0812.ascx-->
<DIV class=hack8px></DIV>
<DIV>
<TABLE id=bottom
style="MARGIN: 1em 0px 0px; WIDTH: 960px; LINE-HEIGHT: 20px"
cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<hr>
</tr>
<TR>
<TD align=middle>
服务E-mail:service@华夏蓝调书香|服务热线电话:021-34014699 |
服务中心传真:021-54960899
</TD>
</TR>
</TABLE>
</DIV>
<!--PageBottom.ascx-->
</DIV>
</body>
</html>
好例子网口号:伸出你的我的手 — 分享!
网友评论
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明


支持(0) 盖楼(回复)
支持(0) 盖楼(回复)