当前位置:开发者网络 >> 技术教程 >> ASP教程 >> 数据库相关 >> 内容
精彩推荐
分类最新教程
分类热点教程
  
根据传入的recordset对象实例,按表格输出内容子过程
作者:未知
日期:2005-05-09
人气:
投稿:(转贴)
来源:未知
字体:
收藏:加入浏览器收藏
以下正文:

function iif(cond,expr1,expr2)
 if cond then
  iif = expr1
 else
  iif = expr2
 end if
end function

sub outinfo(rst)

 allcount=rst.recordcount-1

 response.write "<TABLE id=tablemx><FORM METHOD=POST ACTION=manage.asp>"
    
  response.write "<TR><TD>all<INPUT TYPE=checkbox NAME=allselect></TD>"
  
  for k=0 to rst.fields.count-1

   response.write "<TD>"&rst(k).name&"</TD>"

  next

  response.write "</TR>"
 
 for i=0 to allcount

  response.write "<TR><TD>"&i&"<INPUT TYPE=checkbox NAME=su_no value='"&rst("su_no")&"'></TD>"

  for k=0 to rst.fields.count-1

   response.write "<TD>"&rst(k).value&"</TD>"

  next

  response.write "</TR>"&vbcrlf

  rst.movenext

 next

 response.write "</TABLE>Total records ["&allcount+1&"]</FORM>"

end sub
相关文章: