Effect:
Idea: The foreground JS to achieve Dynamic Data effects, the background can be stitching strings or JSON loading data
Code:
<%@ Page Language="C #"AutoEventWireup="true"codebehind="Tiao.aspx.cs"Inherits="Qiantaoflash.tiao" %><!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml" ><Headrunat= "Server"> <title>Green Apple Bar Statistics</title> <Linkhref= "Css/jquery.spider.poll.css"rel= "stylesheet"type= "Text/css" /><Scripttype= "Text/javascript"src= "Js/jquery-1.4.3.min.js"></Script><Scripttype= "Text/javascript"src= "Js/jquery.spider.poll-min.js"></Script><Scripttype= "Text/javascript">varData="{root:[{id: ' 10000 ', Name: ' Marry First ', Value: '},{id ': ' 10002 ', Name: ' Business First ', Value: '}]}"; vardata1="{root:[{id: ' 10000 ', Name: ' Human Union ', Value: '},{id ': ' 10001 ', Name: ' Orc Tribe ', Value: '},{id ', ' 10003 ', Name: ' Undead dead ', Value: '},{id ': ' 10004 ', Name: ' Night elf ', Value: ' Ten '}]}"; vardata2="{root:[{id: ' 10000 ', Name: ' Education ', Value: ' 0 '},{id: ' 10001 ', Name: ' Ability ', value: ' +} '}"; $ (document). Ready (function (){ $("#poll_a"). Poll ("poll1", {title:'first to get married or to start a career', Width:'600px', data:data}); $("#poll_b"). Poll ("poll2", {title:'Green Apple Warcraft each race strength? ', Titlecolor:'Red', Width:'600px', Data:data1, Showpoll:true, multiple:true }); $("#poll_c"). Poll ("Poll3", {title:'education is important or ability is important', Titlecolor:'Blue', Width:'600px', Data:data2, multiple:false }); $("#getPollData1"). Click (function (){ $("#poll_b"). getchecked (). each (function(i,n) {alert ($ (N). Val ()); }); }); $("#getPollData2"). Click (function (){ $("#poll_c"). getchecked (). each (function(i,n) {alert ($ (N). Val ()); }); });});</Script></Head><Body> <DivID= "Poll_a"></Div><DivID= "Poll_b"></Div><Divstyle= "Text-align:center;"><inputtype= "button"ID= "GetPollData1"value= "Get the value of the first vote"/></Div><DivID= "Poll_c"></Div><Divstyle= "Text-align:center;"><inputtype= "button"ID= "GetPollData2"value= "Get the value of a second poll"/></Div></Body></HTML>
Demo Download:
Http://files.cnblogs.com/files/xinchun/tongjitu.zip
Drip accumulation "JS"---jquery implementation of the bar chart, applicable to the selection of statistics