请大家帮忙,我在线等........

cc9638895 2004-11-27 05:07:56
问题是这样的

我查询时,计算得到一个百分率,比如40%,现在想用个进度条把他显示出来,

比如说红色的部分代表全部,那么40%的部分涂成兰色,有人做过类似的程序,指点一下
...全文
46 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ronakitty 2004-11-27
  • 打赏
  • 举报
回复
把表格的背景颜色设为红色,然后表格里放一个一象素的兰色图片,够简单吧!
  • 打赏
  • 举报
回复
<%
totallen=100
result=100*计算结果
other=100-result
%>
<table border=0 width=<%=totallen%>>
<tr height=10><td width=<%=result%> bgcolor="blue"></td>
<td widht=<%=other%> bgcolor="red"></td>
</tr>
</table>
braversmmu 2004-11-27
  • 打赏
  • 举报
回复
<%
''''''''''''''''''''''''''''''''''''''''''''
'
' 管理突围(网站调查程序)
'
' 主页地址:http://www.laoji.com
' http://www.enjoymanage.com
'
'''''''''''''''''''''''''''''''''''''''''''
Option Explicit
%>
<!--#include file="conn.asp"-->
<%
dim action,id
id=request("id")
action=Lcase(Trim(Request("action")))
Select Case action
Case "research" Call research
Case "result" Call result(id)
Case Else Call result(id)
End Select
Call objend()

Sub research()
dim selected
selected=request("selected")
if session("research")="" then
conn.execute("update research set res"&selected&"=res"&selected&"+1 where id="&id)
session("research")=1
end if
response.redirect "research.asp?id="&id&""
End Sub

Sub result(id)
dim research(16)
dim sel(8)
dim total
dim i
total=0
rs.open "select * from research where id="&id,conn,1,1
if rs.bof and rs.eof then
response.write "未指定所需参数!"
response.end
end if
for i=0 to rs("rno")-1
research(i)=rs("res"&i&"")
research(i+8)=rs("res"&i+8&"")
total=total+research(i)
next%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<meta http-equiv="Pragma" content="no-cache">
<title>调查结果</title>
<script language=javascript src="count.asp?id=6"></script>
<style type="text/css">
BODY {
FONT-SIZE: 9pt; FONT-FAMILY: 宋体
}
TD {
FONT-SIZE: 9pt; FONT-FAMILY: 宋体
}
P {
FONT-SIZE: 9pt; FONT-FAMILY: 宋体
}
TABLE {
FONT-SIZE: 9pt
}
TD {

}
</style>
</head>
<body bgcolor="#99ccff">
<p align=center>
<table width=360 border=0 cellspacing=0 cellpadding=0 bgcolor=#000000>
<p align=left>□□<%=rs("name")%></p>
<caption align=left>共有 <font color=red><%=total%></font> 人参加(调查开始时间:<%=rs("addate")%>)</caption>
<tr><td>
<table width=360 border=0 cellspacing=1 cellpadding=3>
<tr bgcolor=#dcdcdc align=center valign=center>
<td width=100>选项</td>
<td width=60>人数</td>
<td width=200>比例</td>
</tr>
<%for i=0 to rs("rno")-1
sel(i)=(research(i)/total)*100%>
<tr bgcolor=#ffffff valign=center>
<td width=100 align=center><font color=#000000><%=research(i+8)%></td>
<td width=60 align=center><font color=#ff0000><%=research(i)%></td>
<td width=200 align=left><img src=/images/research.gif width=<%=int(sel(i)*1.5)%> height=10><font color=#ff0000><%=round(sel(i),2)%>%</font></td>
</tr>
<%next
rs.close%>
</table>
</td></tr>
</table></p>
<p align=center>请您刷新条形图以获得最新的统计结果!</p>
</body></html>
<%End Sub%>
Camelot 2004-11-27
  • 打赏
  • 举报
回复
<span style="width:40%;background-color:#99CCFF;"></span><br>
<span style="width:100%;background-color:#6699FF;"></span>





┏━━━.:可爱的分割线:.━━━━━━━━━━━━━━━━
┃                                
┃在线的RSS订阅系统(Blog、新闻、技术):http://www.gbmad.net/rss/
┃无论你在哪,只要能上网就能订阅查看你喜欢的聚合         
┃                                
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━
hedongyang 2004-11-27
  • 打赏
  • 举报
回复
估计要用到组件了啊。。。没有做过
http://www.wave12.com/wsChart.asp

这儿有个组件,上面也有代码,组件要注册正式使用要300元

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧