移动端开发注册、登陆input常用事件(input输入文字触发事件)

发布时间:2020-09-05 20:23:05 作者:pmlinjian
来源:网络 阅读:1032

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>移动端开发注册、登陆input常用事件(input输入文字触发事件)</title>

<meta name="keywords" content="积分商城、兑换,春游兑换季,免费"/>

<meta name="description" content="积分春游兑换季,更多车主出行超值商品免费兑换"/>

<meta http-equiv="content-language" content="zh-cn" />

<meta http-equiv="x-ua-compatible" content="ie=emulateie7" />

<meta name="copyright" content="本页版权归IICOO所有。All Rights Reserved" />

<meta name="author" content="IICOO" />

<meta content="yes" name="apple-mobile-web-app-capable" />

<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />

<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style" />

<meta content="telephone=no" name="format-detection" />

<link rel="stylesheet" href="http://wappass.baidu.com/static/touch/css/base_19c066f0.css"/>


</head>

<body>

<div id="pageWrapper">

    <header class="pass-header">

        <a class="pass-header-back" id="goBack"></a> <span class="pass-header-title">  <span class="pass_header_logo">登录帐号</span> </span> <a class="pass-header-links" href="#">注册</a> 

    </header>

    <div class="mod-content">

        <form autocomplete="off" method="POST" class="form-wrapper" id="login-formWrapper">

            <p class="error_area" id="error"></p>

            <p class="form-item form-input-wrapper form-item-username">

                <label class="text-label text-label-username" for="login-username" id="login-label-username">帐号</label>

                <input type="text" name="username" class="text-input" maxlength="60" placeholder="手机号/邮箱/用户名" value="" id="login-username"> <span class="input-clearValue"></span> 

            </p>

            <p class="form-item form-input-wrapper">

                <label class="text-label text-label-password" for="login-password" id="login-label-password">密码</label>

                <input type="password" name="password" class="text-input" id="login-password" placeholder="密码" value=""> <span class="input-clearValue"></span>  <span id="login-pwdToggle" class="input-aide input-pwdToggle"></span> 

            </p>

            <p class="form-item"> <span class="form-input-wrapper"> <label class="text-label text-label-verifyCode " for="login-verifycode">验证码</label> <input type="text" name="verifycode" class="text-input" value="" placeholder="验证码" autocomplete="off" maxlength="6" id="login-verifycode"> <span class="input-clearValue"></span> </span>

                <img class="verifyCode-img" src="http://wappass.baidu.com/cgi-bin/genp_w_picpath?" width="100" height="40" id="login-verifyCodeImg">

                <a class="change-verifyCode" id="login-verifyCodeChange"></a>

                <input type="hidden" id="login-vcodestr" name="vcodestr" value="">

            </p>

            <p class="form-item form-item-btn">

                <input type="submit" value="登录" id="login-submit" class="pass-button-full pass-button-full-disabled">

            </p>

        </form>

        <p class="m-lr14 f14 clearfix"> <a class="right" href="#">忘记密码?</a> 

        </p>

    </div>

    <div class="footer"></div>

</div>


<script type="text/javascript" src="http://baoxian.pingan.com/pa18shopnst/u/wx/product/airDelayNew/js/zepto-1.1.4.build.min.js?t=20151124"></script>

<script type="text/javascript">

 //

 var $loginUsername = $("#login-username")

 var $loginPassword = $("#login-password")

 var $loginPwdToggle = $("#login-pwdToggle");

 $loginPwdToggle.tap(function(){

    //$(this).addClass("input-pwdToggle-show");

    //alert("dd");

    if($loginPassword.attr("type") == "text"){

        $loginPassword.attr("type", "password");

        $loginPwdToggle.removeClass("input-pwdToggle-show");

    }else{

        $loginPassword.attr("type", "text");

        $loginPwdToggle.addClass("input-pwdToggle-show")

    }


 });

//

 $loginUsername.on("input",function(){

        $(this).siblings(".input-clearValue").css("display","block");

 });

//

$loginPassword.on("input",function(){

        $(this).siblings(".input-clearValue").css("display","block");

 });

//

 $(".input-clearValue").tap(function(){

    $(this).siblings("input").val("");

    $(this).css("display","none");

 });

</script>

</body>

</html>


推荐阅读:
  1. input输入框的change事件
  2. web开发的input输入框中有什么事件

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

移动端开发注册、登陆input常用事件( npu

上一篇:Ubuntu18.04系统安装、配置Redis及phpredis扩展操作详解

下一篇:IntelliJ IDEA 设置代码提示或自动补全的快捷键功能

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》