asp教程之如何橫向顯示數(shù)據(jù)代碼_ASP教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:淺析asp程序創(chuàng)建access數(shù)據(jù)庫access數(shù)據(jù)庫屬于“文件型數(shù)據(jù)庫”,創(chuàng)建時(shí)需要指定它要使用的文件,如下所示: SetCatalog_object=Server.CreateObject(ADOX.Catalog) Catalog_object.Create(Provider=Microsoft.Jet.OLEDB.4.0;DataSource=Server.MapPath(/數(shù)據(jù)庫.mdb)) 簡單的兩句話
<%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ù)庫中的全部記錄數(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>
分享:揭秘ASP中單引號(hào)雙引號(hào)和 連接符使用技巧一、單引號(hào) :如學(xué)習(xí)語文課一樣,繼續(xù)放在雙引號(hào)中的引號(hào)可以采用單引號(hào) response.write(Iamhere) 二、ASP中處在雙引號(hào)中的可以是任意的字符、字符串 ,HTML代碼 1.%response.write(Iamhere)%%response.write(cnbrucehere)% 2.%response.write(bIamhe
相關(guān)ASP教程:
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無組件分頁實(shí)現(xiàn)思路及代碼
- 相關(guān)鏈接:
- 教程說明:
ASP教程-asp教程之如何橫向顯示數(shù)據(jù)代碼。