腾讯官方绿茶活动的JavaScript(head-5)
腾讯官方绿茶活动--Head(头部)第5段JavaScript代码(带行号)
地址:http://act.qzone.qq.com/uni-greentea/index.html
<script type="text/javascript">
1
2 var zuanshi = ['红','黄','蓝','紫','粉','绿'];
3 /*
4 function newSize(datoX,datoY) {
5 if(document.all && !document.getElementById) {
6 document.all['main'].style.pixelWidth = datoX;
7 document.all['main'].style.pixelHeight = datoY;
8 }else{
9 document.getElementById('main').style.width = datoX;
10 document.getElementById('main').style.height = datoY;
11 }
12 }*/
13 function newSize(datoX,datoY) {
14 if(document.all && !document.getElementById) {
15 document.all['main'].style.width = datoX+"px";
16 document.all['main'].style.height = datoY+"px";
17 }else{
18 document.getElementById('main').style.width = datoX+"px";
19 document.getElementById('main').style.height = datoY+"px";
20 }
21 }
22 function show_zero(obj)
23 {
24 var m1 = MSG2.create('温馨提示','您目前没有玩转盘游戏的机会', null);
25 m1.setIcon(2);
26 m1.setButton([3]);
27 m1.onunload = function(){
28 window.location.href="user.html";
29 }
30 m1.show();
31 }
32 function show_err(obj){
33 obj=eval('obj='+obj);
34 switch(obj.err){
35 case 4501:
36 showLogin();
37 break;
38 case 4506:
39 getPopUp('reg.html','',500,350);
40 break;
41 default :
42 var m1 = MSG2.create('温馨提示', obj.msg, null);
43 m1.setIcon(2);
44 m1.setButton([3]);
45 m1.onunload = function(){
46 window.location.href="index.html";
47 }
48 m1.show();
49 break;
50 }
51 }
52
53 function show_exchange(arg){
54 var obj = eval('obj='+arg);
55 if(obj.data){
56 var m1 = MSG2.create('温馨提示','恭喜您获得一颗'+zuanshi[obj.data.type-1]+'钻,我们将会记录您的兑奖情况,活动结束后将会有
专人给您赠送奖品', null);
57 m1.setIcon(1);
58 m1.setButton([1]);
59 m1.onunload = function(){
60 window.location.href="user.html";
61 }
62
63 m1.show();
64
65 }
66 else
67 {
68 var m1 = MSG2.create('温馨提示', obj.msg, null);
69 m1.setIcon(2);
70 m1.setButton([3]);
71 m1.onunload = function(){
72 window.location.href="index.html";
73 }
74
75 m1.show();
76
77 }
78 }
79
80
81 function show_info(arg){
82 var obj=eval('obj='+arg);
83 if(obj.data){
84 var leftTips = '您还剩下' + obj.data.left + '次转盘机会。';
85 var m1 = MSG2.create('温馨提示','恭喜您获得了' + obj.data.score + '分', leftTips);
86 m1.setIcon(1);
87 m1.setButton([1]);
88 m1.onunload = function(){
89 window.location.href="user.html";
90 }
91 m1.show();
92 }
93 else
94 {
95 var m1 = MSG2.create('温馨提示', obj.msg, null);
96 m1.setIcon(2);
97 m1.setButton([3]);
98 m1.onunload = function(){
99 window.location.href="index.html";
100 }
101
102 m1.show();
103 }
104 }
105
106 function show_succ(obj){
107 if(!obj.error){
108 var msg1 = '您已经注册过了';
109 var msg2 = '3秒钟后将跳转到您的个人主页。';
110 var m1 = MSG2.create(null, msg1, msg2);
111 m1.setIcon(1);
112 m1.setButton([1]);
113 m1.onconfirm = function(){location.href = 'user.html'};
114 setTimeout(function(){m1.onconfirm()},3000)
115 m1.show();
116 }
117 }
118
119 //-->
120
</script>
地址:http://act.qzone.qq.com/uni-greentea/index.html
<script type="text/javascript">
1
2 var zuanshi = ['红','黄','蓝','紫','粉','绿'];
3 /*
4 function newSize(datoX,datoY) {
5 if(document.all && !document.getElementById) {
6 document.all['main'].style.pixelWidth = datoX;
7 document.all['main'].style.pixelHeight = datoY;
8 }else{
9 document.getElementById('main').style.width = datoX;
10 document.getElementById('main').style.height = datoY;
11 }
12 }*/
13 function newSize(datoX,datoY) {
14 if(document.all && !document.getElementById) {
15 document.all['main'].style.width = datoX+"px";
16 document.all['main'].style.height = datoY+"px";
17 }else{
18 document.getElementById('main').style.width = datoX+"px";
19 document.getElementById('main').style.height = datoY+"px";
20 }
21 }
22 function show_zero(obj)
23 {
24 var m1 = MSG2.create('温馨提示','您目前没有玩转盘游戏的机会', null);
25 m1.setIcon(2);
26 m1.setButton([3]);
27 m1.onunload = function(){
28 window.location.href="user.html";
29 }
30 m1.show();
31 }
32 function show_err(obj){
33 obj=eval('obj='+obj);
34 switch(obj.err){
35 case 4501:
36 showLogin();
37 break;
38 case 4506:
39 getPopUp('reg.html','',500,350);
40 break;
41 default :
42 var m1 = MSG2.create('温馨提示', obj.msg, null);
43 m1.setIcon(2);
44 m1.setButton([3]);
45 m1.onunload = function(){
46 window.location.href="index.html";
47 }
48 m1.show();
49 break;
50 }
51 }
52
53 function show_exchange(arg){
54 var obj = eval('obj='+arg);
55 if(obj.data){
56 var m1 = MSG2.create('温馨提示','恭喜您获得一颗'+zuanshi[obj.data.type-1]+'钻,我们将会记录您的兑奖情况,活动结束后将会有
专人给您赠送奖品', null);
57 m1.setIcon(1);
58 m1.setButton([1]);
59 m1.onunload = function(){
60 window.location.href="user.html";
61 }
62
63 m1.show();
64
65 }
66 else
67 {
68 var m1 = MSG2.create('温馨提示', obj.msg, null);
69 m1.setIcon(2);
70 m1.setButton([3]);
71 m1.onunload = function(){
72 window.location.href="index.html";
73 }
74
75 m1.show();
76
77 }
78 }
79
80
81 function show_info(arg){
82 var obj=eval('obj='+arg);
83 if(obj.data){
84 var leftTips = '您还剩下' + obj.data.left + '次转盘机会。';
85 var m1 = MSG2.create('温馨提示','恭喜您获得了' + obj.data.score + '分', leftTips);
86 m1.setIcon(1);
87 m1.setButton([1]);
88 m1.onunload = function(){
89 window.location.href="user.html";
90 }
91 m1.show();
92 }
93 else
94 {
95 var m1 = MSG2.create('温馨提示', obj.msg, null);
96 m1.setIcon(2);
97 m1.setButton([3]);
98 m1.onunload = function(){
99 window.location.href="index.html";
100 }
101
102 m1.show();
103 }
104 }
105
106 function show_succ(obj){
107 if(!obj.error){
108 var msg1 = '您已经注册过了';
109 var msg2 = '3秒钟后将跳转到您的个人主页。';
110 var m1 = MSG2.create(null, msg1, msg2);
111 m1.setIcon(1);
112 m1.setButton([1]);
113 m1.onconfirm = function(){location.href = 'user.html'};
114 setTimeout(function(){m1.onconfirm()},3000)
115 m1.show();
116 }
117 }
118
119 //-->
120
</script>
浙公网安备 33010602011771号