欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

display.asp

创建和运行动态、交互的Web服务器应用程序
ASP
字号:
<!--#include file="conn.asp"-->
<HTML>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
  <HEAD><TITLE>调查结果</TITLE></HEAD>
  <BODY>
<%
  Dim oRS			' 声明Recordset对象
  Dim Sela, Selb, Selc	' 声明对应数据库中调查字段的变量
  Dim Total 			' 声明总票数
    ' 从Request对象中获取选择项值
  selected = Request.Form("options")
    ' 创建ADO的Recordset对象
  Set oRS = Server.CreateObject("ADODB.Recordset")
  oRS.Open "SELECT * FROM shop_Search ",conn,1,1
  Total = oRS("Sela") + oRS("Selb") + oRS("Selc")
  If Not oRS.Eof And Total <> 0 Then
    Sela = (oRS("Sela") / Total) * 100
    Selb = (oRS("Selb") / Total) * 100
    Selc = (oRS("Selc") / Total) * 100
%>

 <table width="100%" border="0" cellpadding="-2" cellspacing="-2">
    <tr><td valign="top">
    <table width="100%" border="1" bordercolor="#ffffff" bordercolordark="#ffffff" bordercolorlight="#800000" cellpadding="0" cellspacing="0">
    <tr>
    <td width="150" bgcolor="#800000">
    <div align="center"><strong><font color="#ffffff">选项&nbsp;</strong></div></td>
    <td height="20" bgcolor="#800000">
    <div align="left"><strong><font color="#ffffff">图例&nbsp;</strong></div></td>
    <td height="20" bgcolor="#800000">
    <div align="center"><strong><font color="#ffffff">投票人数&nbsp;</strong></div></td>
    <td height="20" bgcolor="#800000">
    <div align="center"><strong><font color="#ffffff">比例&nbsp;</font></strong></div></td>
    <tr>
    <td width="150" height="20">
    <div align="center"><strong>图书品种及网站功能&nbsp;</strong></div></td>
    <td height="20">
    <div align="left"><strong><IMG src=images\bar.gif width=<%=Int(Sela)%>  height=15></strong></div></td>
    <td height="20">
    <div align="center"><strong><%=oRS("Sela")%>人 占:</strong></div></td>
    <td height="20">
    <div align="center"><strong><%=Round(Sela, 2)%>%</strong></div></td>
    <tr>
    <td width="150" height="20">
    <div align="center"><strong>产品物流和售后服务&nbsp;</strong></div></td>
    <td height="20">
    <div align="left"><strong><IMG src=images\bar.gif width=<%=Int(Selb)%>  height=15></strong></div></td>
    <td height="20">
    <div align="center"><strong><%=oRS("Selb")%>人 占:</strong></div></td>
    <td height="20">
    <div align="center"><strong><%=Round(Selb, 2)%>%</strong></div></td>
    <tr>
    <td width="150" height="20">
    <div align="center"><strong>网站推广及媒介合作&nbsp;</strong></div></td>
    <td height="20">
    <div align="left"><strong><IMG src=images\bar.gif width=<%=Int(Selc)%>  height=15></strong></div></td>
    <td height="20">
    <div align="center"><strong><%=oRS("Selc")%>人 占:</strong></div></td>
    <td height="20">
    <div align="center"><strong><%=Round(Selc, 2)%>%</strong></div></td>
    </TABLE>
    <tr><td height=20></tr></td>
    <tr><td>共有<font color=red><%=Total%></font>人参加调查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最后提交时间:<font color=blue><%=oRS("tptime")%></font></td>
        <td></td>
</TABLE>
   
<%End If
  oRS.Close
  Set oRS = Nothing%>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -