所属分类:网页特效-表格
<link href="css/jQuery.spider.poll.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jQuery.spider.poll.js"></script>
var data="{root:[{id:'10000',name:'jquery图片特效',value:'50'},{id:'10001',name:'jquery导航菜单',value:'20'},{id:'10002',name:'jquery选项卡特效',value:'10'},{id:'10003',name:'jquery文字特效',value:'10'},{id:'10004',name:'jquery表单特效',value:'10'}]}";
$("#poll_b").poll("poll2",{
title:'js特效',
titleColor:'#ff0000',
width:'600px',
data:data1,
showPoll:true,
multiple:true
});
$("#getPollData1").click(function (){
$("#poll_b").getChecked().each(function (i,n){
alert($(n).val());
});
});
<div id="poll_b"></div>
<div class="btn"><input type="button" id="getPollData1" value="获得第一个投票的值"/></div>