<%
dim conn
dim connstr
on error resume next
connstr="DBQ="+server.mappath("hq/fpdb/Database.asa")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
Set rszs= Server.CreateObject("ADODB.Recordset")
zssql="select * from spzs where flag=1 and zsbz like '%01%' order by ID desc"
rszs.open zssql,conn,1,1
%>
document.write("<TABLE border=0 cellPadding=0 cellSpacing=0 width='167' height='167'>");
document.write(" <TR bgColor=#448fe2> ");
document.write(" <TD height='25'> <FONT class=f12 color=#ffffff><B>精品推荐</B></font></TD>");
document.write(" </TR>");
document.write(" <TR>
document.write(" <TD colspan='2' align=right><IMG height=5 src='pict/corner.gif' width=5></TD>");
document.write(" </TR>");
document.write(" <TR> ");
document.write(" <TD height='7'><IMG height=5 src='Pict/shim.gif' width=1></TD>");
document.write(" </TR>");
document.write(" <TR> ");
document.write(" <TD class=lh15 height='117' valign='top'> ");
<%DO WHILE NOT rszs.eof%>
document.write(" <TABLE border=0 cellPadding=0 cellSpacing=0 width='146' height='10'>");
document.write(" <TR> ");
document.write(" <TD valign='top' height='19'>");
document.write(" <A href=hq/spzs/Show_product.asp?id=<%=rszs("ID")%> target='_blank'><b><%=rszs("cpmc")%></b></a><BR>");
document.write(" </TD>");
document.write(" </TR>");
document.write(" </TABLE>");
<%
x=x+1
if x>=5 then exit do
rszs.movenext
loop
rszs.close
set rszs=nothing
%>
document.write(" </TD>");
document.write(" </TR>");
document.write("</TABLE>");
dim conn
dim connstr
on error resume next
connstr="DBQ="+server.mappath("hq/fpdb/Database.asa")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
Set rszs= Server.CreateObject("ADODB.Recordset")
zssql="select * from spzs where flag=1 and zsbz like '%01%' order by ID desc"
rszs.open zssql,conn,1,1
%>
document.write("<TABLE border=0 cellPadding=0 cellSpacing=0 width='167' height='167'>");
document.write(" <TR bgColor=#448fe2> ");
document.write(" <TD height='25'> <FONT class=f12 color=#ffffff><B>精品推荐</B></font></TD>");
document.write(" </TR>");
document.write(" <TR>
document.write(" <TD colspan='2' align=right><IMG height=5 src='pict/corner.gif' width=5></TD>");
document.write(" </TR>");
document.write(" <TR> ");
document.write(" <TD height='7'><IMG height=5 src='Pict/shim.gif' width=1></TD>");
document.write(" </TR>");
document.write(" <TR> ");
document.write(" <TD class=lh15 height='117' valign='top'> ");
<%DO WHILE NOT rszs.eof%>
document.write(" <TABLE border=0 cellPadding=0 cellSpacing=0 width='146' height='10'>");
document.write(" <TR> ");
document.write(" <TD valign='top' height='19'>");
document.write(" <A href=hq/spzs/Show_product.asp?id=<%=rszs("ID")%> target='_blank'><b><%=rszs("cpmc")%></b></a><BR>");
document.write(" </TD>");
document.write(" </TR>");
document.write(" </TABLE>");
<%
x=x+1
if x>=5 then exit do
rszs.movenext
loop
rszs.close
set rszs=nothing
%>
document.write(" </TD>");
document.write(" </TR>");
document.write("</TABLE>");
document.write(""); document.write(" "); document.write(" 精品推荐 "); document.write("
"); document.write(" document.write(" "); -------------
我用HTML页面调用的时候,状态栏出现“网页上有错误呀”!
dim sArray1,sArray2
sArray1=""
sArray2=""
DO WHILE NOT rszs.eof
sArray1=sArray1&",'"&rszs("ID")&"'"
sArray2=sArray2&",'"&rszs("cpmc")&"'"
rszs.movenext
loop
%>
<script language="javascript">
var theID=new Array(<%=sArray1%>)
var therszs=new Array(<%=sArray2%>)
//theID[0]和therszs[0]都为空,需要的数据从[1]开始
</script>
其实应该用XML的,但是我不懂