Check

功能描述

拖动验证,用例见 check.html。

效果图

依赖的插件

swiper.min.js rem.js jquery.min.js

快速使用

js 调用

<script>
    var btn1 = document.getElementById("btn1");
    var btn2 = document.getElementById("btn2");
    var btn3 = document.getElementById("btn3");
    var result1 = document.getElementById("result1");
    var result2 = document.getElementById("result2");
    var result3 = document.getElementById("result3");

    var slider1 = new FtSlider({
        id: "slider1",
        callback: function(res) {
            result1.innerHTML = res;
        }
    });

    var slider2 = new FtSlider({
        id: "slider2",
        width: 320,
        height: 36,
        textMsg: "拖动滑块到右边",
        successMsg: "验证成功了哦",
        callback: function(res) {
            result2.innerHTML = res;
        }
    });

    var slider3 = new FtSlider({
        id: "slider3",
        width: "100%",
        height: "100%",
        callback: function(res) {
            result3.innerHTML = res;
        }
    });

    btn1.onclick = function() {
        slider1.restore();
        result1.innerHTML = "false";
    }

    btn2.onclick = function() {
        slider2.restore();
        result2.innerHTML = "false";
    }

    btn3.onclick = function() {
        slider3.restore();
        result3.innerHTML = "false";
    }
    </script>

特别说明

拖动验证,见用例 check.html。

是否仍需要帮助? 请保持联络!
最后更新于 2024/05/31