小吉 发表于 2022-9-28 13:00:00

WP博客侧栏小工具-在线小姐姐跳舞代码

https://www.kxdao.net/data/attachment/forum/202209/22/221601drszs0kv12sknil2.png

https://www.kxdao.net/data/attachment/forum/202209/22/221549rx5km1kmka8f2anf.png
<div>
    <section id="main">
      <video id="player" src="https://dwz.mk/MVZVjy" controls="controls" width="100%" height="400px"></video>
    </section>
</div>
<div style="text-align: center;">
    <section id="buttons">
      <button id="switch">连续: 开</button>
      <button id="next1">换一个</button>
    </section>
</div>

<script>
    (function (window, document) {
      if (top != self) {
            window.top.location.replace(self.location.href);
      }
      var get = function (id) {
            return document.getElementById(id);
      }
      var bind = function (element, event, callback) {
            return element.addEventListener(event, callback);
      }
      var auto = true;
      var player = get('player');
      var randomm = function () {
            player.src = 'http://v.nrzj.vip/video.php?_t=' + Math.random();
            player.play();
      }
      bind(get('next1'), 'click', randomm);
      bind(player, 'error', function () {
            randomm();
      });
      bind(get('switch'), 'click', function () {
            auto = !auto;
            this.innerText = '连续: ' + (auto ? '开' : '关');
      });
      bind(player, 'ended', function () {
            if (auto) randomm();
      });
    })(window, document);</script>
<script>var _hmt = _hmt || [];(function() {var hm = document.createElement("script");hm.src = "";var s = document.getElementsByTagName("script"); s.parentNode.insertBefore(hm, s);})();</script>
<style>
    #switch,#next1{
    background: #7F9CCC;
    color:#fff;
    line-height:40px;
    text-align:center;
    width:100px;
    border:none;
    margin:0 6px;
    border-radius:6px;
    font-weight:bold;
    }
</style>

mengbo 发表于 2022-9-28 14:04:20

看不懂

厉害的皮卡丘 发表于 2022-9-28 18:55:45

厉害了{:4_190:}
页: [1]
查看完整版本: WP博客侧栏小工具-在线小姐姐跳舞代码