• Bootstrap历练实例:验证状态


    验证状态

    Bootstrap 包含了错误、警告和成功消息的验证样式。只需要对父元素简单地添加适当的 class(.has-warning、 .has-error 或 .has-success)即可使用验证状态。

    实例:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Bootstrap历练实例:验证状态</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <link rel="stylesheet" href="bootstrap-3.3.5-dist/css/bootstrap.min.css" />
    </head>
    <body>
    <div class="container">
    <form class="form-horizontal" role="form">
    <div class="form-group has-success">
    <label for="success" class="control-label col-sm-2">输入成功:</label>
    <div class="col-sm-10">
    <input type="text" class="form-control" id="success" />
    </div>
    </div>
    <br />
    <div class="form-group has-warning">
    <label for="warning" class="control-label col-sm-2">输入警告:</label>
    <div class="col-sm-10">
    <input type="text" class="form-control" id="warning" />
    </div>
    </div>
    <br />
    <div class="form-group has-danger">
    <label for="danger" class="control-label col-sm-2">输入危险:</label>
    <div class="col-sm-10">
    <input type="text" class="form-control" id="danger" />
    </div>
    </div>
    <br />
    <div class="form-group has-error">
    <label for="error" class="control-label col-sm-2">输入危险:</label>
    <div class="col-sm-10">
    <input type="text" class="form-control" id="error" />
    </div>
    </div>
    </form>
    </div>

    <script src="jQuery/jquery-2.1.4.js"></script>
    <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
    </body>
    </html>

  • 相关阅读:
    wepy框架构建小程序(1)
    百度地图2
    百度地图1
    VS Code 用户自定义代码片段(React)
    JS MarcoTasks MicroTasks
    JS位运算和遍历
    VueX源码分析(5)
    VueX源码分析(4)
    tensorflow 自带的实现函数翻转的函数
    namedtuple
  • 原文地址:https://www.cnblogs.com/melao2006/p/4988074.html
Copyright © 2020-2023  润新知