left.jsp

来自「jsp学习源码 jsp学习源码 jsp学习源码 jsp学习源码 jsp学习源码 」· JSP 代码 · 共 86 行

JSP
86 行
字号
<%News news = new News();
Vector newsList = new Vector();
newsList = news.loadTop10News();
%>
<table width="185" cellspacing="0" border="0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">
 <tbody>
  <tr>
    <td width="100%" colspan="2" class="td3">
    <img border="0" src="img/jiao2.gif" width="20" height="20"><b>&nbsp;&nbsp;&nbsp;
    综合TOP10</b></td>
  </tr>
  <tr>
    <td width="100%" colspan="2" class="td1"><center><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%">
    <%if(newsList.size()>0){
    for(int i=0;i<newsList.size();i++){
	News newsall= (News)newsList.elementAt(i);
	out.println("<tr onmouseover=\"this.bgColor='#FFF2EC';\" onmouseout=\"this.bgColor='#FFFAF8';\">\n<td width='12' height='15' valign='top'><img src='img/bullet.gif'></td>");
	out.println("<td width='100%'><a href='news.jsp?news_id="+newsall.getnews_id()+"'>"+newsall.getnews_title()+"</a></td>\n</tr>");
	}}%>
	</table>
    </td>
  </tr>
  <tr>
    <td width="170" class="td2" height="15"><img border="0" src="img/null.gif"></td>
    <td width="15" align="right" height="15" bgcolor="#F2F8FF">
    <img border="0" src="img/jao4.gif" width="15" height="15"></td>
  </tr>
  </tbody>
</table>
<img src="img/null.gif">
<table width="185" cellspacing="0" border="0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">
 <tbody>
  <tr>
    <td width="100%" colspan="2" class="td3">
    <img border="0" src="img/jiao2.gif" width="20" height="20"><b>&nbsp;&nbsp;&nbsp;
    本周TOP10</b></td>
  </tr>
  <tr>
    <td width="100%" colspan="2" class="td1"><center><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%">
    <%TopNews week=new TopNews();
    newsList=week.WeekTop10();
    if(newsList.size()>0){
    for(int i=0;i<newsList.size();i++){
	TopNews newsall= (TopNews)newsList.elementAt(i);
	out.println("<tr onmouseover=\"this.bgColor='#FFF2EC';\" onmouseout=\"this.bgColor='#FFFAF8';\">\n<td width='12' height='15' valign='top'><img src='img/bullet.gif'></td>");
	out.println("<td width='100%'><a href='news.jsp?news_id="+newsall.getnews_id()+"'>"+newsall.getnews_title()+"</a></td>\n</tr>");
	}}
	%>
	</table></td>
  </tr>
  <tr>
    <td width="170" class="td2" height="15"><img border="0" src="img/null.gif"></td>
    <td width="15" align="right" height="15" bgcolor="#F2F8FF">
    <img border="0" src="img/jao4.gif" width="15" height="15"></td>
  </tr>
  </tbody>
</table>
<img src="img/null.gif">
<table width="185" cellspacing="0" border="0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0">
 <tbody>
  <tr>
    <td width="100%" colspan="2" class="td3">
    <img border="0" src="img/jiao2.gif" width="20" height="20"><b>&nbsp;&nbsp;&nbsp;
    今日TOP10</b></td>
  </tr>
  <tr>
    <td width="100%" colspan="2" class="td1"><center><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%">
    <%//TopNews week=new TopNews();
    newsList=week.DayTop10();
    if(newsList.size()>0){
    for(int i=0;i<newsList.size();i++){
	TopNews newsall= (TopNews)newsList.elementAt(i);
	out.println("<tr onmouseover=\"this.bgColor='#FFF2EC';\" onmouseout=\"this.bgColor='#FFFAF8';\">\n<td width='12' height='15' valign='top'><img src='img/bullet.gif'></td>");
	out.println("<td width='100%'><a href='news.jsp?news_id="+newsall.getnews_id()+"'>"+newsall.getnews_title()+"</a></td>\n</tr>");
	}}
	%>
	</table></td>
  </tr>
  <tr>
    <td width="170" class="td2" height="15"><img border="0" src="img/null.gif"></td>
    <td width="15" align="right" height="15" bgcolor="#F2F8FF">
    <img border="0" src="img/jao4.gif" width="15" height="15"></td>
  </tr>
  </tbody>
</table>
<br>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?