asp 橫排顯示數(shù)據(jù)
更新時(shí)間:2009年07月09日 00:22:30 作者:
asp 橫排顯示數(shù)據(jù)的方法,實(shí)際上就是控制tr td來(lái)實(shí)現(xiàn)多行多列的實(shí)現(xiàn)方法,大家可以先用靜態(tài)的表格然后循環(huán)輸出就可以了。
復(fù)制代碼 代碼如下:
<%
sql="select * from serr where order by id asc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%><style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
-->
</style>
<table width=""100%"" align='center'>
<%
for i=1 to rs.recordCount '變量i從1循環(huán)到數(shù)據(jù)庫(kù)中的全部記錄數(shù)
if (i mod 4 =1) then '每個(gè)tr顯示4個(gè)記錄,可根據(jù)需要自行修改
response.write "<tr>"
end if
response.write "<td width=200>"&rs("title")&"<br>"&rs("con")&"<br>"&rs("www")&"<br>"&rs("keyword")&"</td>"
if (i mod 4 = 0) then
response.write "</tr>"
end if
rs.movenext
next
rs.close
%>
</table>
相關(guān)文章
用ASP VBS xmlhttp adodbstream下載和保存圖片的代碼
用ASP VBS xmlhttp adodbstream下載和保存圖片的代碼...2007-03-03編寫一個(gè)含二級(jí)目錄的源碼(Asp+JavaScript)
編寫一個(gè)含二級(jí)目錄的源碼(Asp+JavaScript)...2007-04-04ASP強(qiáng)制刷新網(wǎng)頁(yè)和判斷文件地址實(shí)例代碼
這篇文章主要介紹了ASP強(qiáng)制刷新網(wǎng)頁(yè)和判斷文件地址實(shí)例代碼,需要的朋友可以參考下2015-09-09asp將全角的字符轉(zhuǎn)變成半角字符,將半角轉(zhuǎn)變成全角d的代碼
2008-01-01服務(wù)器XMLHTTP(Server XMLHTTP in ASP)基礎(chǔ)知識(shí)
幾年很流行 Ajax,而 Ajax 的本質(zhì)就是 XMLHttpRequest,是客戶端 XMLHttpRequest 對(duì)象的使用。2010-08-08