This article mainly introduces the sample code for native JS to achieve the 9-palace lattice lottery effect. It has good reference value. Next, let's take a look at it. This article mainly introduces the Code for the implementation of the native javascript code for the jiugongge lottery. It has good reference value. Let's take a look at it with the small Editor.
:
- First prize
- Second prize
- Third prize
- 4th Prize
Start
- Fifth Prize
- Sixth Prize
- 7th Prize
- 8th Prize
Script var container = document. getElementById ('Container'), li = iner. getElementsByTagName ('lil'), aa = container. getElementsByTagName ('A') [0], pp = document. getElementById ('pp '), timer = null; function start () {var I = 0; var num = Math. floor (Math. random () * li. length) + 20; if (I
';} Else {pp. innerHTML + = "Congratulations, you have received:" + parseInt (num % li. length) + "" +'
';}}, 130) ;}} aa. onclick = function () {start ();} script
The above is the detailed content of the Code for implementing the jiugongge Lucky Draw using native javascript. For more information, see other related articles in the first PHP community!