请问ASP图片调用的问题!急.....!!!!!!!!~~~

来源:百度知道 编辑:UC知道 时间:2024/05/17 01:48:47
下面是一个picnews.asp,它只是在主页上显示一张最新的带联接的图片新闻,如何改为显示6张图片新闻呢?....谢谢!!!!

<!--#include file="conn.asp"-->
<html>
<head>
<title>图片新闻</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css.css">
</head>

<body>
<%
sql="select top 1 * from NEWS where firstImageName<>'' and ok=true order by ID DESC"
set rs=conn.execute(sql)
if not Rs.eof then
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" height="129"><a href="funonews.asp?id=<%=rs("id")%>" target="_blank" >
<img src="uppic/<%=trim(rs("firstImageName"))%

用FRONTPAGE的代码模式修改,或者用记事本打开修改。
=======================================
top 1 改为 top 6,然后做个循环就可以了:
<!--#include file="conn.asp"-->
<html>
<head>
<title>图片新闻</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css.css">
</head>

<body>
<%
sql="select top 6 * from NEWS where firstImageName<>'' and ok=true order by ID DESC"
set rs=conn.execute(sql)
if not Rs.eof then
do while not rs.eof
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" height="129"><a href="funonews.asp?id=<%=rs("id")%>" target="_blank" > <