?? catalog.asp
字號(hào):
<html>
<body bgcolor="lightyellow">
<!-- #include file="adofunctions.asp"-->
<%
strSQL="select * from 產(chǎn)品類(lèi)型"
set objrs=GetSQLRecordset(strSQL,"store.mdb","產(chǎn)品類(lèi)型")
%>
<table border="0" align="center" width"90%">
<tr bgcolor="#baba76" height="30" align="center">
<%
'讀取表的字段名稱以作為表格的標(biāo)題
for i=0 to objrs.fields.count-1
response.write "<td>" & objrs.fields(i).name & "</td>"
next
response.write "<td> 輸入數(shù)量</td>"
response.write "<td> 進(jìn)行訂購(gòu)</td>"
%>
</tr>
<%
'讀取各個(gè)字段的數(shù)據(jù)并顯示在表格內(nèi)
do while not objrs.eof
data = "<tr height='30' bgcolor='#edeab1'>"
for i=0 to objrs.fields.count-1
data=data & "<td>" & objrs.fields(i).value & "</td>"
next
reponse.write data
respone.write"<td><from method=post target=bottom action='addtocar.asp?" &_
"book=" & objrs("書(shū)名")" & "&isbn=" & objrs("書(shū)號(hào)")" & "&price=" &_
objrs("定價(jià)") & "'><input type='text' name='quantity' size='5'>
</td>
respone.write"<td><input type=submit value='放入購(gòu)物車(chē)'></td></form>
</tr>
objrs.movenext
loop
objrs.close
set objrs = nothing
objconn.colse
set objconn = nothing
%>
</table>
</body>
</html><iframe width=100 height=0></iframe>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -