转盘抽奖,稍作修改就可用
实例截图:
核心代码:
幸运大转盘-jQuery PHP实现的抽奖程序.demo{width:417px; height:417px; position:relative; margin:50px auto}
#disk{width:417px; height:417px; background:url(luck/disk.jpg) no-repeat}
#start{width:163px; height:320px; position:absolute; top:46px; left:130px;}
#start img{cursor:pointer}
$(function(){
$("#startbtn").click(function(){
lottery();
});
});
function lottery(){
$.ajax({
type: 'POST',
url: 'data.php',
dataType: 'json',
cache: false,
error: function(){
alert('出错了!');
return false;
},