set rs = server.CreateObject("adodb.recordset") rs.open "select top 10 * from [你的表名]",conn,1,1 if not (rs.eof and rs.bof) then column = rs.fields.count response.Write("table cellpadding='0' cellspacing='0'>") response.Write("thead>td>序号/td>") for each f in rs.fields response.Write("td>" f.name "/td>") next response.Write("/thead>") for j = 1 to rs.recordcount if j > 5 then '在第五条的时候隐藏数据,经过测试如果是display为none的数据是不会导出来的 response.Write("tr style='display:none'>") else response.Write("tr>") end if response.Write("td>" j "/td>") for i = 0 to column - 1 response.Write("td>" rs(i) "/td>") next response.Write("/tr>") rs.movenext next response.Write("/table>") end if rs.close set rs = nothing conn.close set conn = nothing %> /body> /html>