<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td><img src="Img/sonews.gif" width="205" height="41"></td>
</tr>
<tr>
<td align="center" background="Img/sobg.gif"><table width="90%" border="0" cellpadding="0" cellspacing="0">
<form name="form1" method="get" action="News_search.asp">
<tr>
<td height="30" align="center">
<input type="text" name="key" size="19" class="input"> </td>
</tr>
<tr>
<td height="30" align="center">
<select name="otype" class="input">
<option value="title" selected class="input">新闻标题</option>
<option value="msg" class="input">新闻内容</option>
</select>
<input type="submit" name="Submit" value="搜索" class="input"></td>
</tr>
</form>
</table></td>
</tr>
<tr>
<td valign="top"><img src="Img/sotb.gif" width="205" height="6"></td>
</tr>
</table><br>
<table width="98%" border="0" cellpadding="5" cellspacing="1" bgcolor="#DDDDDD">
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="3" cellspacing="0" bgcolor="#EFEFEF">
<tr>
<td><table width="100%" border="0" cellpadding="1" cellspacing="0">
<tr bgcolor="#DDDDDD">
<td height="26" colspan="2"><font color="#000000">最新新闻 NEW6</font></td>
</tr>
<%
t=0
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT * from NEWS order by id desc"
rs.Open sql,conn,1,1
if not Rs.eof then
do while not rs.eof
t=t+1
%>
<tr onmouseover="this.bgColor='#ffffff';"onmouseout="this.bgColor='#efefef';">
<td width="18%" height="22" align="center" style="border-right: 1 solid #000000;border-bottom: 1 solid #000000"><%= t %></td>
<td width="82%" style="border-bottom: 1 solid #000000"> <a href="shownews.asp?id=<%=rs("id")%>" title="<%=rs("title")%>" target="_blank"><%=left(rs("title"),10)%></a></td>
</tr>
<%
if t>=6 then exit do
rs.movenext
loop
else
response.write "<tr><td align=center colspan=2 bgcolor=#E8E8F4>尚无收录</td></tr>"
end if
待续
參考答案:贴出错误信息吧