zoukankan      html  css  js  c++  java
  • HTML简易的用户名密码登录页面_艾孜尔江撰

    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <title>登录</title>
        <meta name="viewport"
            content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
    
        <meta name="apple-mobile-web-app-capable" content="yes">
    
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
    
        <meta name="format-detection" content="telephone=no">
    
    
    </head>
    
    <body>
        <div class="login" style="text-align: center; margin-top: 215px;">
            <h1>Welcome</h1>
            <div class="text">
                <i class="fa fa-user-o" aria-hidden="true"></i><!-- Font Awesome -->
                <input type="text" placeholder="Username" id="name" style="auto;height: auto; margin-top: 10px;">
            </div>
            <div class="text">
                <i class="fa fa-lock" aria-hidden="true"></i><!-- Font Awesome -->
                <input type="password" placeholder="Password" id="pass" style="auto;height: auto;margin-top: 10px;">
            </div>
            <button onclick="login()" style="margin-top: 35px;  100px;;height: 30px;">登录</button>
        </div>
        <script type="text/javascript">
            function login() {
                let username = document.getElementById("name").value;
                let password = document.getElementById("pass").value;
                let uName = Math.floor(Math.sqrt(2) / 2);
                let pCode = Math.ceil(Math.sqrt(2));
                console.log(uName)
                console.log(pCode)
                if (username == uName.toString() && password == pCode.toString()) {
                    //alert("登录成功");
                    window.location = "__index.html";
                    return false;
                }
                else {
                    alert("账号或密码错误");
                    window.location = "index.html";
                    return false;
                }
            }
        </script>
    
    </body>
    
    </html>
    
  • 相关阅读:
    vs2013 中如何如何让html页面的设计视图显示
    UITableView
    iOS Quartz2D绘制线、矩形、弧、圆、文字、图片
    iOS Quartz2D模拟下载进度条
    多控制器管理 UITabBarController
    UIApplicationDelegate类
    extern static关键字
    深复制与浅复制
    ios数据存储方式
    UITableView定义分割线
  • 原文地址:https://www.cnblogs.com/ezhar/p/15115472.html
Copyright © 2011-2022 走看看