移動端開發註冊、登陸input常用事件(input輸入文字觸發事件)

來源:互聯網
上載者:User

標籤:移動端開發註冊、登陸input常用事件(input輸入文字觸發事件)

<!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/genimage?" 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>


移動端開發註冊、登陸input常用事件(input輸入文字觸發事件)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.