用vml 的一个例子 <!--以下便是完整的 Js+Vml 制作柱状投票统计图的完整程序,保存为HTM文件运行即可看到效果 其中 array数组中的分组可以为6个也可以为2,3,4,5个等,运行以下程序需要您的浏览器支持VML 改编为ASP文件则new Array(<%=rs(0)>,<%=rs(1)>,<%=rs(2)>,<%=rs(3)>,<%=rs(4)>,<%=rs(5)>)即可 --> <HTML xmlns:v> <HEAD> <META http-equiv="Content-Type" content="text/html; Charset=gb2312"> <META name="GENERATOR" content="网络程序员伴侣-Lshdic 2002"> <TITLE>蓝丽民意调查</TITLE> <STYLE> td{font-size:12px} body{font-size:12px} v/:*{behavior:url(#default#VML);} //这里声明了v作为VML公用变量 </STYLE> </HEAD> <body bgcolor=eeeeee style='border:0 solid eeeeee'><center>共有<font color=red>69</font>人参与过投票<br> <script> array1=new Array(16,14,10,16,5,8) //不同的投票票数 allstr=array1[0]+array1[1]+array1[2]+array1[3]+array1[4]+array1[5] //得到总数 for(i=0;i<=5;i++){ mathstr=Math.round(100/(allstr/array1[i])) //求百分之几, 100/(总和/单个) document.write ("<v:rect fillcolor='lime' style='width:20;color:navy;height:"+5000/(1000/mathstr)+"'><br> %"+mathstr+"<br>"+array1[i]+"人<v:Extrusion backdepth='15pt' on='true'/></v:rect>") } </script> <p> <table width=190><Tr><Td> 增加新的栏目版块</td><Td>16人</td></tr><tr><td> 完善娱乐视听</td><Td>14人</td></tr><tr><td> 完善技术文章</td><Td>10人</td></tr><tr><td> 完善下载中心</td><Td>16人</td></tr><tr><td> 完善在线工具</td><Td>5人</td></tr><tr><td> 完善程式交流论坛</td><Td>8人</td></tr></table><p> <a href='javascript:self.close()' style='text-Decoration:none;'>〖关闭窗口〗</a><p> <A href='http://www.lshdic.com' target='_blank'>http://www.lshdic.com</a> Work by 02/12/01 </BODY> </HTML> 蓝丽程序员论坛收录 http://www.lshdic.com |
作者:xkou 2004-4-28 22:56:06 回复此发言 |
|
2.回复:想在网页中显示饼图、柱状图等统计图形 |
完全可以! <script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> width="468" scrolling="no" height="60" frameborder="0" allowtransparency="" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-5721617751938911&dt=1176708746312&lmt=1176708746&prev_fmts=468x60_as&format=468x60_as&output=html&channel=9799599142&pv_ch=9799599142%2B&url=http%3A%2F%2Finfo.00555.com%2FTopic_oxyxui.html&color_bg=FFFFFF&color_text=000000&color_link=000000&color_url=0066CC&color_border=FFFFFF&ad_type=text_image&ref=http%3A%2F%2Fwww.baidu.com%2Fs%3Fie%3Dgb2312%26bs%3D%25C8%25ED%25BC%25FE%25B9%25A4%25B3%25CC%25B9%25FD%25B3%25CC%26sr%3D%26z%3D%26cl%3D3%26f%3D8%26wd%3D%25CD%25F8%25D2%25B3%25D6%25D0%25C8%25E7%25BA%25CE%25CF%25D4%25CA%25BE%25D6%25F9%25D7%25B4%25CD%25BC%26ct%3D0&cc=484&u_h=768&u_w=1024&u_ah=738&u_aw=1024&u_cd=32&u_tz=480&u_java=true" marginheight="0" marginwidth="0" name="google_ads_frame"> |
作者:lawdoor 2004-4-28 23:08:39 回复此发言 |
|
3.回复:想在网页中显示饼图、柱状图等统计图形 |
用VML可以轻松实现: http://61.172.255.65/dvbbs/t3/t17.asp http://61.172.255.65/dvbbs/t3/t18.asp http://61.172.255.65/dvbbs/t3/t19.asp 代码太多了,没有办法给你拷贝! |