# 求大神解答转盘抽奖.

0

```\$(function(){
var \$rotaryArrow = \$('#rotaryArrow');
var \$result = \$('#result');
var \$resultTxt = \$('#resultTxt');
var \$resultBtn = \$('#result');

\$rotaryArrow.click(function(){
var data = [0, 1, 2, 3, 4, 5, 6, 7];
data = data[Math.floor(Math.random()*data.length)];
switch(data){
case 1:
rotateFunc(1,87,' <em>1</em> ');
break;
case 2:
rotateFunc(2,43,'<em>5</em> ‘);
break;
case 3:
rotateFunc(3,134,' <em>10</em> ');
break;
case 4:
rotateFunc(4,177,'');
break;
case 5:
rotateFunc(5,223,' <em>20</em> ');
break;
case 6:
rotateFunc(6,268,' <em>50</em> ');
break;
case 7:
rotateFunc(7,316,' <em>30</em> ');
break;
default:
rotateFunc(0,0,'');
}
});

var rotateFunc = function(awards,angle,text){
\$rotaryArrow.stopRotate();
\$rotaryArrow.rotate({
angle: 0,
duration: 5000,
animateTo: angle + 1440,
callback: function(){
\$resultTxt.html(text);
\$result.show();
}
});
};

\$resultBtn.click(function(){
\$result.hide();
});
});  大神求解答我该如何写AJAX传送到PHP里，还有PHP接收到如何写输出值啊？```
YaYou~ | 初学一级 | 园豆：6

1

您需要登录以后才能回答，未注册用户请先注册