博客主页
随机小姐姐
随机小姐姐

Author:

CC-star

©

Wordage:

共计 3954 字

needs:

约 1 分钟

Popular:

222 ℃

Created:

:本文最后更新于2024年01月11日,已经过了465天没有更新,若内容或图片失效,请留言反馈
目 录

示例


代码

{hide}

<div>
    <section id="main">
        <video id="player" src="http://v.nrzj.vip/video.php" 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 src="https://hm.baidu.com/hm.js?a8569fd6981018f096d774868306a054
<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 = "https://hm.baidu.com/hm.js?a8569fd6981018f096d774868306a054";var s = document.getElementsByTagName("script")[0]; 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>
文章二维码
随机小姐姐
共计 0 条评论,点此发表评论
博客主页 数据猫 漫游于星空的数据猫
技术支持 CC 数据猫. 2025
打赏图
打赏博主
欢迎
欢迎
欢迎访问数据猫
搜 索
足 迹
分 类
  • 简文
  • 技术
  • 娱乐