zoukankan      html  css  js  c++  java
  • 微信小程序 功能函数 密码验证*

    //登录输入密码
    userPasswordInput: function (e) {
    var that = this;

    this.setData({
    userPassword: e.detail.value
    })
    // console.log(e.detail.value.length)
    // console.log(e.detail.value);
    var value = e.detail.value
    var strkong = /^[0-9a-zA-Z]{0,25}$/g;
    if (strkong.test(value)) {
    that.setData({
    truePwd: true
    })
    } else {
    // console.log("cwoca")
    wx.showModal({
    title: '提示',
    content: '密码由0~25位由数字和26个英文字母混合而成',
    showCancel: false,
    success: function (res) {
    that.setData({
    truePwd: false
    })
    }

    })

    }
    },
  • 相关阅读:
    四种wordpress常用的循环结构
    自动创建网页文章目录结构
    shell
    SSH
    架构
    Https
    if-else、switch、while、for
    do-while
    const
    Tail Call
  • 原文地址:https://www.cnblogs.com/dianzan/p/8003898.html
Copyright © 2011-2022 走看看