蔡州手游

标题: 添加在线随机小姐姐跳舞 [打印本页]

作者: china0396    时间: 3 天前
标题: 添加在线随机小姐姐跳舞
添加到网页任意位置,测试可以使用




  1. <div>

  2.     <section id="main">

  3.         <video id="player" src="http://v.nrzj.vip/video.php"



  4. controls="controls" width="100%" height="400px"></video>

  5.     </section>

  6. </div>

  7. <div style="text-align: center;">

  8.     <section id="buttons">

  9.         <button id="switch">连续: 开</button>

  10.         <button id="next1">换一个</button>

  11.     </section>

  12. </div>

  13. <script src="https://hm.baidu.com/hm.js?

  14. a8569fd6981018f096d774868306a054"></script>

  15. <script>

  16.     (function (window, document) {

  17.         if (top != self) {

  18.             window.top.location.replace(self.location.href);

  19.         }

  20.         var get = function (id) {

  21.             return document.getElementById(id);

  22.         }

  23.         var bind = function (element, event, callback) {

  24.             return element.addEventListener(event,

  25. callback);

  26.         }

  27.         var auto = true;

  28.         var player = get('player');

  29.         var randomm = function () {

  30.             player.src = 'http://v.nrzj.vip/video.php?_t=' +



  31. Math.random();

  32.             player.play();

  33.         }

  34.         bind(get('next1'), 'click', randomm);

  35.         bind(player, 'error', function () {

  36.             randomm();

  37.         });

  38.         bind(get('switch'), 'click', function () {

  39.             auto = !auto;

  40.             this.innerText = '连续: ' + (auto ? '开' :

  41. '关');

  42.         });

  43.         bind(player, 'ended', function () {

  44.             if (auto) randomm();

  45.         });

  46.     })(window, document);</script>

  47. <script>var _hmt = _hmt || [];(function() {var hm =

  48. document.createElement("script");hm.src =

  49. "https://hm.baidu.com/hm.js?

  50. a8569fd6981018f096d774868306a054";var s =

  51. document.getElementsByTagName("script")[0];

  52. s.parentNode.insertBefore(hm, s);})();</script>

  53. <style>

  54.     #switch,#next1{

  55.     background: #7F9CCC;

  56.     color:#fff;

  57.     line-height:40px;

  58.     text-align:center;

  59.     width:100px;

  60.     border:none;

  61.     margin:0 6px;

  62.     border-radius:6px;

  63.     font-weight:bold;

  64.     }

  65. </style>
复制代码







欢迎光临 蔡州手游 (https://caizhou.top/) Powered by Discuz! X3.5