zoukankan      html  css  js  c++  java
  • 登陆页面

    登陆页面

    参考邮件主页,编写了一个只有form的登陆页面,可跳转至http://mail.swpu.edu.cn/

    运行效果

    文件目录

    html代码

    <!DOCTYPE html>
    <html lang="zh" dir="ltr">
    
    <head>
      <link rel="stylesheet" href="css/style.css">
      <script type="text/javascript" src="script/login.js"></script>
      <meta charset="utf-8">
      <title>FAKE NEWS</title>
    
    </head>
    
    <body>
      <div class="logform">
      <label class="title"for="AAAA">帐号登录</label>
    
        <form class="loginform" id="aaa" onsubmit="checkinput()" method="get">
          <input class="inputbox" type="text" id="userid" placeholder="用户名">
          <input class="inputbox" type="password" id="passwd" placeholder="密码">
          <input class="submit" type="submit" name="submit" value="登陆">
        </form>
      </div>
    
    
    </body>
    
    </html>
    <!--
    
    ->
    
    

    js代码

    
    function checkinput(){
    
      var id = document.getElementById('userid').value;
      var passwd = document.getElementById('passwd').value;
    
    
      if(id=="" || passwd=="")
      {
        alert('用户名或密码为空');
      }
      else if(id=="tom" && passwd=="123")
      {
          document.getElementById('aaa').action="http://mail.swpu.edu.cn";
      }
      else {
        alert('用户名或密码错误');
      }
      return;
    }
    
    

    css代码

    .logform{
      border-radius: 15px;
      background-color: #f2f2f2;
    
      400px;
      height: 200px;
    
      position: absolute;
      left:50%;
      top:50%;
      margin-left:-200px;
      margin-top:-150px;
    
      padding: 20px;
    }
    .inputbox{
       100%;
      padding: 12px 20px;
      margin: 8px 0;
      display: inline-block;
      border: 1px solid #ccc;
      border-radius: 4px;
      box-sizing: border-box;
    }
    .submit {
       100%;
      background-color: #4CAF50;
      color: white;
      padding: 14px 20px;
      margin: 8px 0;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }
    
    .submit:hover {
      background-color: #45a049;
    }
    .title{
       100%;
      color: Blue;
      padding: 14px 20px;
      margin: 8px 0;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    
    }
    
    

    百度云盘

    链接: https://pan.baidu.com/s/1SPZSgXiCCfxXH3rSDZmPJQ 提取码: azak 复制这段内容后打开百度网盘手机App,操作更方便哦

  • 相关阅读:
    vue项目总结,所用到的技术点
    豆瓣电影个人项目总结
    博学谷项目总结,个人总结经验
    JavaScript数组的常用方法
    移动端base.css的内容,
    normalize.css可以对css初始化,不同浏览器可以统一初始样式
    jsp第十次作业
    jsp第九次作业
    jsp第八次作业
    jsp第七次作业
  • 原文地址:https://www.cnblogs.com/HuppertWu/p/10607588.html
Copyright © 2011-2022 走看看