最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Bootstrap實現(xiàn)前端登錄頁面帶驗證碼功能完整示例

 更新時間:2020年03月26日 10:37:38   作者:人間四月天  
這篇文章主要介紹了Bootstrap實現(xiàn)前端登錄頁面帶驗證碼功能,結(jié)合完整實例形式分析了Bootstrap前端登錄頁面帶驗證碼界面布局與功能實現(xiàn)相關(guān)操作技巧,需要的朋友可以參考下

本文實例講述了Bootstrap實現(xiàn)前端登錄頁面帶驗證碼功能。分享給大家供大家參考,具體如下:

Bootstrap有自定義的驗證碼樣式,在前端頁面可以直接使用,他的css、js在使用前要在開頭引入

上代碼:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <!-- 告訴瀏覽器網(wǎng)頁所識別的文件類型及語言類型 -->
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>登錄</title>
  <!-- 讓一些搜索引擎搜索到你的網(wǎng)頁 -->
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet"  rel="external nofollow" > 
  <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  <script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
  <script src="tool.js"></script>
  <style>
  .carousel-inner img {
    width:100%;
    height:100%;
  }
  .jumbotron {
    margin-top: 10px;
    margin-bottom: 0px;
    padding-top: 10px;
  }
  #demo {
    width:100%;
    height: 500px;
  }
  .row {
    height: 264px;
  }
  .left {
    float: left;
    width: 70%;
  }
  .right {
    float: left;
    width: 30%;
  }
  .card {
    height: 340px;
  }
  .carousel-inner {
    height: 500px;
  }
  .footer {
    position: absolute;
    bottom: 0;
    height: 60px;
  }
  .jumheight1 {
    height: 100px;
  }
  .jumheight2 {
    height: 100px;
  }
  .end_name {
    margin-bottom: 5px;
  }
  .footer2 {
    padding-top: 210px;
    text-align: center;
  }
  .test{
    margin-bottom: 75px;
  }
  .carousel-control-prev,
  .carousel-control-next{
    bottom: 120px;
  }
  </style>
</head>
<body>
  <div>
    <form class="form active" method="post" action="{:url('index/Login/doLogin')}">
    <div class="jumbotron text-info bg-light jumheight1">
      <h1>圖書閱讀網(wǎng)</h1>
      <p>一個免費的圖書網(wǎng)站</p>
    </div>
    <!-- 輪播圖 -->
    <!-- 指示符 -->
    <div class="row">
    <div class="left">
    <div id="demo" class="carousel slide " data-ride="carousel">
      <ul class="carousel-indicators">
        <li data-target="#demo" data-slide-to="0" class="active"></li>
        <li data-target="#demo" data-slide-to="1"></li>
        <li data-target="#demo" data-slide-to="2"></li>
      </ul>
      <!-- 輪播圖片 -->
      <div class="carousel-inner">
        <div class="carousel-item active">
          <img src="http://static.runoob.com/images/mix/img_fjords_wide.jpg">
        </div>
        <div class="carousel-item">
          <img src="http://static.runoob.com/images/mix/img_nature_wide.jpg">
        </div>
        <div class="carousel-item">
          <img src="http://static.runoob.com/images/mix/img_mountains_wide.jpg">
        </div>
      </div>
      <!-- 左右切換按鈕 -->
      <a href="#demo" rel="external nofollow" rel="external nofollow" class="carousel-control-prev" data-slide="prev">
        <span class="carousel-control-prev-icon"></span>
      </a>
      <a href="#demo" rel="external nofollow" rel="external nofollow" class="carousel-control-next" data-slide=next>
        <span class="carousel-control-next-icon"></span>
      </a>
    </div>
    </div>
    <div class="right">
    <!-- 登陸窗口 -->
    <div class="card">
      <div class="card-header">
        用戶登陸
      </div>
      <div class="card-body">
        <form>
          <table style="border-collapse: separate;/*border-spacing: 30px 20px;*/">
            <tr>
              <td class="margin-top:10">
                <label>電話號碼:</label>
              </td>
              <td>
                  <input type="text" name="username" pattern="^\d{11}" id="username" class="form-control" placeholder="請輸入您的電話號碼">
                <!-- <input type="text" name="username" pattern="^\d{11}" id="username" class="form-control" placeholder="請輸入您的電話號碼" required> -->
              </td>
              
            </tr>
            <tr>
              <td>
                <label>密碼:</label>
              </td>
              <td>
                <input type="password" name="password" id="password" class="form-control" placeholder="請輸入您的密碼">
                
              </td>
            </tr>
              <tr>
              <td>
                <label for="captcha" class="test">驗證碼:</label> 
              </td>
              <td> 
                
                <input type="text" name="captcha" class="form-control "  id="captcha" placeholder="請輸入驗證碼">
                <!-- 點擊驗證碼更換 -->
                <br>
                <div class="code-img"><img height="50px" src="{:captcha_src()}" alt="captcha" onClick="this.src='{:captcha_src()}?'+Math.random()"/></div>
              </td>
            </tr>        
          </table>
          <div class="footer"> 
          <button type="submit" class="btn btn-primary" >登陸</button>
          <button type="submit" class="btn btn-secondary " formaction="{:url('index/Repassword/index')}" >忘記密碼?</button> 
          </div>
        </form>
      </div>
    </div>
    </div>
    </div>
    
    </div>
  </div>
  <script>
    fieldTest();
  </script>
</body>
</html>

效果圖:

這里還有輪播圖,點擊驗證碼時會更新

可以使用在線HTML/CSS/JavaScript代碼運行工具http://tools.jb51.net/code/HtmlJsRun測試上述代碼運行效果。

PS:關(guān)于bootstrap布局,這里再為大家推薦一款本站的在線可視化布局工具供大家參考使用:

在線bootstrap可視化布局編輯工具:
http://tools.jb51.net/aideddesign/layoutit

希望本文所述對大家基于bootstrap的程序設(shè)計有所幫助。

相關(guān)文章

最新評論

凤庆县| 华坪县| 滁州市| 务川| 开原市| 含山县| 夏津县| 丽江市| 镇沅| 沛县| 马关县| 宁波市| 台前县| 蒙城县| 久治县| 惠来县| 鹤山市| 南城县| 乌兰察布市| 北京市| 麻栗坡县| 清镇市| 禹城市| 河曲县| 临夏市| 襄汾县| 许昌市| 郑州市| 东乌珠穆沁旗| 石台县| 谢通门县| 武冈市| 略阳县| 六安市| 庄河市| 葵青区| 浦江县| 龙川县| 军事| 务川| 万源市|