欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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)文章

  • javascript事件處理模型實例說明

    javascript事件處理模型實例說明

    本文主要介紹IE和火狐在添加刪除事件上的區(qū)別,并給出通用的解決方法,需要的朋友可以參考下。
    2016-05-05
  • 使用defer和async實現(xiàn)高效加載JavaScript

    使用defer和async實現(xiàn)高效加載JavaScript

    async和defer都是異步加載腳本,但async是加載完腳本后立即執(zhí)行,而defer是在HTML解析完成后再執(zhí)行腳本,本文給大家介紹了如何使用defer和async高效加載JavaScript,文中通過代碼和圖文講解的非常詳細(xì),需要的朋友可以參考下
    2024-06-06
  • 禁止IE用右鍵的JS代碼

    禁止IE用右鍵的JS代碼

    這篇文章主要介紹了禁止IE用右鍵的JS代碼,有需要的朋友可以參考一下
    2013-12-12
  • JavaScript數(shù)組深拷貝和淺拷貝的兩種方法

    JavaScript數(shù)組深拷貝和淺拷貝的兩種方法

    在使用JavaScript對數(shù)組進(jìn)行操作的時候,我們經(jīng)常需要將數(shù)組進(jìn)行備份,事實證明如果只是簡單的將它賦予其他變量,那么我們只要更改其中的任何一個,然后其他的也會跟著改變,這就導(dǎo)致了問題的發(fā)生。
    2014-04-04
  • 用JavaScript做簡易的購物車的代碼示例

    用JavaScript做簡易的購物車的代碼示例

    這篇文章主要介紹了用JavaScript做簡易的購物車的代碼示例,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2017-10-10
  • 用javascrpt將指定網(wǎng)頁保存為Excel的代碼

    用javascrpt將指定網(wǎng)頁保存為Excel的代碼

    這段代碼在服務(wù)器中沒有權(quán)限,可以保存在本地,存為htm文件,運行即可,就可以把文本內(nèi)容存為excel文件了
    2008-01-01
  • 判斷數(shù)組是否包含某個元素的js函數(shù)實現(xiàn)方法

    判斷數(shù)組是否包含某個元素的js函數(shù)實現(xiàn)方法

    下面小編就為大家?guī)硪黄袛鄶?shù)組是否包含某個元素的js函數(shù)實現(xiàn)方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2016-05-05
  • javascript模擬php函數(shù)in_array

    javascript模擬php函數(shù)in_array

    就是判斷一個元素是否存在于數(shù)組中的函數(shù),既然js里string都有indexOf函數(shù),為什么不在Array對象里設(shè)置一個這樣的函數(shù)呢,其實就用indexOf這個思想挺好的,不知道制定JS標(biāo)準(zhǔn)的人是基于什么考慮,把這樣一個如此常用的功能沒考慮在內(nèi)的。
    2015-04-04
  • js DOM的事件常見操作實例詳解

    js DOM的事件常見操作實例詳解

    這篇文章主要介紹了js DOM的事件常見操作,結(jié)合實例形式詳細(xì)分析了JavaScript DOM事件概念、原理及DOM操作常見實現(xiàn)技巧與使用注意事項,需要的朋友可以參考下
    2019-12-12
  • 通過遮罩層實現(xiàn)浮層DIV登錄的js代碼

    通過遮罩層實現(xiàn)浮層DIV登錄的js代碼

    遮罩層實現(xiàn)浮層DIV登錄的效果,想必很多的朋友都有遇到過吧,實現(xiàn)起來也是很簡單的,下面有個不錯的實現(xiàn),大家可以感受下
    2014-02-02

最新評論