收起左侧

[前端] 微信加好友手机端页面提示信息显示

0
回复
[复制链接]
avatar
  • TA的每日心情
    qdsmile开心
    2019-6-10 15:08
  • 签到天数: 3 天

    [LV.2]小吧熟人

    4

    主题

    3

    帖子

    64

    积分

    发表于 2019-6-3 15:58:09 | 显示全部楼层 |阅读模式
    js:
    1. $(function(){
    2.     var DiquArr = ["湖南","山东","北京","广州","临沂","济南","驻马店","衡水","上海","沧州","四川","天津","苏州","成都","杭州","武汉","贵州","吉林","滨州","安徽","遵义","菏泽","南阳","新乡","北京","岳阳","郴州","许昌","连云港","大理","茂名","周口","秦皇岛","榆林","淮安","株洲","漳州","禹州","德州","菏泽","吉林","湖州","襄阳","江门","惠州","邯郸","郑州","天水","兰州","洛阳","宜昌","临沂","泰安","平顶山"];  
    3.     var RenArr = ["任先生","王女士","刘先生","刘女士","宋先生","吴女士","赵先生","孙女士","钱女士","武女士","孙先生","周先生","吴先生","吴女士","武先生","郑先生","周女士","郑女士","陈先生","冯女士","陈先生","冯女士","程先生","方女士","程先生","魏先生","魏女士","马女士","方先生","马先生","蒋先生","姜女士","蒋女士","姜先生","沈先生","沈女士","韩女士","杨先生","杨女士","尤女师","徐先生","朱先生","朱女士","秦先生","秦女士","尤先生","韩先生","何女士","吕先生","吕女士","石先生","洪先生","洪女士","孔先生","孔女士","曹先生","石女士","许先生","徐女士","许女士","何先生","张先生","张女士","曹女士","严先生","严女士"]
    4.      setInterval(function(){
    5.      //地区
    6.      var n = Math.floor(Math.random() * DiquArr.length);
    7.      var diqu=DiquArr[n];
    8.      //console.log(diqu);
    9.       $('.diqu').html(diqu);
    10.      //人名
    11.       var m = Math.floor(Math.random() * RenArr.length);
    12.       var ren=RenArr[m];
    13.     //  console.log(ren);
    14.       $('.ren').html(ren);
    15.       $('.div09div').show(500); //将DIV标签显示出来。
    16.       setTimeout(function(){
    17.           $('.div09div').hide(500); //将DIV标签隐藏。
    18.       }, 1500);
    19.     },4000);
    20. })
    复制代码


    使用方法:
    1,复制代码到js文件里
    2,复制下方js引入到页面<head></head>里面
    1. <script src="js路径" type="text/javascript" charset="utf-8"></script>
    复制代码

    3,复制下方代码放到页面底部</body>上面
    1. <div class="div09div" style="width: 100%;height: auto;overflow: hidden;position: fixed;bottom: 75px;left: 0;display: none;">
    2.         <div class="div09" style="width: 80%;height: 30px;line-height: 30px;overflow: hidden;font-size: 14px;margin: 0 auto;background: rgba(0,0,0,0.7);text-align: center;color: #fff;border-radius: 10px;">来自
    3.                 <span class="diqu"></span>的
    4.                 <span class="ren"></span>刚添加了微信好友
    5.         </div>
    6. </div>
    复制代码
    参与人数 1金币 +120 收起 理由
    avatar itjc8 + 120 感谢分享!

    查看全部评分总评分 : 金币 +120

    您需要登录后才可以回帖 登录 | 立即注册 QQ登录

    本版积分规则