Git Product home page Git Product logo

verify-slim's Introduction

verify-slim

验证码,省市区三联级,图片上传,线程(主要是样式)

这里在修改了原verify.js,在第12行,增加了vfinput.setAttribute("data-canvas",validate),目的,判断输入与生成验证码的等值


一、distpicker.js代码解析:

1.参数设置,第19行:


    var DEFAULTS = {
        // Selects the districts automatically.
        // 0 -> Disable autoselect,禁用自动选择
        // 1 -> Autoselect province only,自动选择省
        // 2 -> Autoselect province and city only,自动选择省,市
        // 3 -> Autoselect all (province, city and district),自动选择省,市,区
        autoselect: 0,

        // Show placeholder.
        placeholder: true,

        // Select value. Options: 'name' and 'code'
        valueType: 'name',

        // Defines the initial value of province.省的初始值
        province: '--省--',

        // Defines the initial value of city.市的初始值
        city: '--市--',

        // Defines the initial value of district.区的初始值
        district: '--区--'
    };

2.绑定在dom上的data-toggle使用,第4282行:


    if (WINDOW.document) {
        $(function () {
            $('[data-toggle="' + NAMESPACE + '"]').distpicker();
        });
    }

DOM结构:

    <div data-toggle="distpicker">
        <select id="province3" data-province="---- 选择省 ----"></select>
        <select id="city3" data-city="---- 选择市 ----"></select>
        <select id="district3" data-district="---- 选择区 ----"></select>
    </div>

预览

verify-slim's People

Contributors

besswang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.