根据传入的recordset对象实例,按表格输出内容子过程

发表于:2007-06-30来源:作者:点击数: 标签:
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=tablemxFORM METHOD=POST ACTION=manage.asp" response.write "TR TD allINPUT TYP

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

原文转自:http://www.ltesting.net