H5刮刮乐中奖

原创 tsf2014 随笔 笔录 432阅读 2018-01-09 15:41:12 举报

<div class="swiper-container" style="display:none;">
<div class="swiper-wrapper">

  <div class="swiper-slide Swiper3 swiper-no-swiping">
    <div class="zhanP">
      <div class="pians" ><img src="images/Prk.png" /></div>
      <div class="picd"><img src="images/pic.jpg"></div>
    </div>
    <div class="juan">
      <span class="Jtu1"><img src="images/icon3.png"></span>
      <span class="Jtu2"><img src="images/dog.png"></span>
      <div id="mask_img_bg" class="mask">
        <img id="redux" class="Jtu3" src="images/gua.png">
        <span class="Jwen"></span>
        <span class="Jtu7"><img src="images/Gbg.png"></span>
      </div>

      <span class="Jtu4"><img src="images/icon4.png"></span>
      <span class="Jtu5"><img src="images/icon5.png"></span>
      <span class="Jtu6"><img src="images/icon2.png"></span>

    </div>
    <button class="saves"><img src="images/btn3.png"></button>

    <div class="swiper-bg" style="background:url(images/babg1.jpg) no-repeat 50% 50%; background-size:100%"></div>

  </div>

</div>

<!-- 刮刮乐 -->
<script type="text/javascript" src="js/jquery.eraser.js"></script>
<script type="text/javascript">
$(window).load(function () {

    var imgarr = ["幸运奖", "一等奖", "二等奖", "三等奖"];
    $('#redux').eraser({
        size: 50,   //设置橡皮擦大小
        completeRatio: .5, //设置擦除面积比例
        completeFunction: showResetButton   //大于擦除面积比例触发函数

    });
    /*获取随机数*/
    var info = parseInt(Math.random() * 100);
    var thanks;

    /*通过判断设置出现概率*/
    if (info >= 1 && info <= 25) {
        arrinfo = imgarr[0];
        thanks = true;
    } else if (info >= 25 && info <= 50) {
        arrinfo = imgarr[1];
        thanks = true;
    } else if (info >= 50 && info <= 75) {
        arrinfo = imgarr[2];
        thanks = true;
    } else if (info >= 75 && info <= 100) {
        arrinfo = imgarr[3];
        thanks = true;
    } 

    $("#mask_img_bg .Jwen").text(arrinfo);
    function showResetButton() {

        location.assign("http://www.w3school.com.cn")

// $(".prize-img").attr("src", arrinfo);
//$(".prize-span").text(arrinfo);
/if (thanks == true) {
$(".main_box .hint-show,.main_box .mask").fadeIn(300)
}
/
}

})

</script>

评论 ( 3 )
最新评论
857075770 2018-01-12 14:42:54 3F

某某教育h5课程的练习题 你也好b放在上面。简直垃圾。

tsf2014 1F 2018-01-11 17:33:01 2F

不懂别逼逼

857075770 2018-01-10 10:15:31 1F

某某培训机构的练习题 你也有脸放在这上面。官方应该封号处理