<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻广告</title>
<link href="../css/cbebcss.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#F4F4F4" leftmargin="0" topmargin="6" marginwidth="0" marginheight="0">
<%
Dim db,rs,strSql
Set db=Server.CreateObject("ADODB.Connection")
db.Open "Dsn=数据库名"
Set rs=Server.CreateObject("ADODB.Recordset")
strsql="select * from 表名 "
rs.Open strSql,db,1
%>
<table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#999999" align="center">
<tr bgcolor="#DBDBDB">
<td width="18%" align="center" >标题</td>
<td width="20%" height="18" align="center" >分类</td>
<td width="15%" height="18" align="center" > 发布时间</td>
</tr>
<%
Do While Not rs.Eof
%>
<tr bgcolor="#FFFFFF" onmouseover="this.bgColor = '#ebebeb'" onmouseout="this.bgColor = '#FFFFFF'">
<td height="11" align="center"><%=rs("title")%></td>
<td height="11" align="center"><%=rs("typestr")%></td>
<td height="11" align="center"><%=rs("uptime")%></td>
</tr>
<%
rs.MoveNext
Loop
%>
</table>
</body>
</html>
[ 本帖最后由 kevinxu0638 于 2010-12-4 19:46 编辑 ]