日期:2014-05-17  浏览次数:20948 次

表格纵向循环的一个问题。这段代码怎么回事,运行后页面是空白的。
VBScript code

<%
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("xuexiao.mdb")
set rs=server.CreateObject("adodb.recordset")
rs.open"select * from banji",conn,3,2
dim tmp,tmp1,tmp2,tmp3
tmp="<table>"
while not rs.eof
  tmp1=tmp1 & "<td>"&rs("shuxue")&"</td>"
  tmp2=tmp2 & "<td>"&rs("yuwen")&"</td>"
  tmp3=tmp3 & "<td>"&rs("huaxue")&"</td>"
rs.movenext
wend
tmp1="<tr>" & tmp1 & "</tr>"
tmp2="<tr>" & tmp2 & "</tr>"
tmp3="<tr>" & tmp3 & "</tr>"
tmp=tmp & tmp1 & tmp2 & tmp3
tmp=tmp & "</table>"
%>



怎么运行后没有后到效果。

------解决方案--------------------
错了,是
tmp = tmp & "<tr><td>一班</td><td>二班</td><td>三班</td></tr>"