bootstrap表单控件
禁用状态:
被禁用的 fieldset
为<fieldset>
设置 disabled
属性,可以禁用 <fieldset>
中包含的所有控件。
<form>
<fieldset disabled>
<div class="form-group">
<label for="disabledTextInput">Disabled input</label>
<input type="text" id="disabledTextInput" class="form-control" placeholder="Disabled input">
</div>
<div class="form-group">
<label for="disabledSelect">Disabled select menu</label>
<select id="disabledSelect" class="form-control">
<option>Disabled select</option>
</select>
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Can't check this
</label>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</fieldset>
</form>
这是个整体案例
单个案例只需要添加disable就可以了
<button type="submit" class="btn btn-default" disabled>Submit</button>
使用点击事件进行:
<button type="submit" class="btn btn-default btnclick" >Submit</button>
$(function () { //index()会返回当前元素在所有兄弟元素里面的索引。
$(".btnclick").click(function () {
$(".btnclick").attr("disabled",true);
}); });
这样,在前端,点击之后是不可以再次重复点击
给按钮添加点击事件的两种方式:
/* $(function () { //index()会返回当前元素在所有兄弟元素里面的索引。
$(".btnclick").click(function () {
$(".btnclick").attr("disabled",true);
}); });*/
function clickbtn() {
$(".btnclick").attr("disabled",true); }
给按钮添加一个clickbtn的方法,那么也是可以实现的
bootstrap表单控件的更多相关文章
- bootstrap 表单控件 控件状态 控件大小 help-block
bootstrap 表单控件 控件状态 控件大小 help-block <!DOCTYPE html> <html lang="en"> <head& ...
- Bootstrap 表单控件一(单行输入框input,下拉选择框select ,文本域textarea)
单行输入框,常见的文本输入框,也就是input的type属性值为text.在Bootstrap中使用input时也必须添加type类型,如果没有指定type类型,将无法得到正确的样式,因为Bootst ...
- bootstrap -- css -- 表单控件
若干css样式 .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14p ...
- Bootstrap系列 -- 18. 表单控件大小
前面看到的表单控件都正常的大小.可以通过设置控件的height,line-height,padding和font-size等属性来实现控件的高度设置.不过Bootstrap框架还提供了两个不同的类名, ...
- Bootstrap系列 -- 14. 表单控件输入框input
每一个表单都是由表单控件组成.离开了控件,表单就失去了意义.接下来的我们简单的来了解Bootstrap框架中表单控件的相关知识. 单行输入框,常见的文本输入框,也就是input的type属性值为tex ...
- Bootstrap历练实例:表单控件大小
表单控件大小 您可以分别使用 class .input-lg 和 .col-lg-* 来设置表单的高度和宽度. 实例: <!DOCTYPE html><html><hea ...
- Bootstrap的表单控件
支持的表单控件 Bootstrap 支持最常见的表单控件,主要是 input.textarea.checkbox.radio 和 select. 输入框(Input) 最常见的表单文本字段是输入框 i ...
- Bootstrap关于表单控件(按扭)
按钮也是表单重要控件之一,制作按钮通常使用下面代码来实现: ☑ input[type=“submit”] ☑ input[type=“button”] ☑ input[type=“r ...
- Bootstrap关于表单控件(Radio,CheckBox)
表单控件(复选框checkbox和单选择按钮radio) Bootstrap框架中checkbox和radio有点特殊,Bootstrap针对他们做了一些特殊化处理,主要是checkbox和radio ...
随机推荐
- PLSQL链接oracle报错--ORA-12154: TNS: 无法解析指定的连接标识符
D:\install\PLSQL\instantclient_11_2 今天重新安装了oracle 11g,plsql连接oracle时发生报错:ORA-12154: TNS: 无法解析指定的连接标识 ...
- 高性能的城市定位API接口
如果不需要精准的定位,还有一种通过IP地址获取当前城市的方法,采用新浪的api接口. <script src="http://int.dpool.sina.com.cn/iplooku ...
- LoadRunner 关联和集合点、检查点
1)关联的定义 很多时候,当时录完之后,没有问题.过一段时间再跑脚本,就不会成功.比如session,过期了,再一次使用,就会出错.这个时候,需要在每次访问的时候动态的拿到session,这种情况就需 ...
- 阿里云ECS购买优惠码
今天收到了阿里云给我发的邮件,大意是阿里云推荐码限量开放,可享九折优惠! 于是就点击进去申请了一下 申请的优惠码是:C7IYIS有效期至2015-11-30 23:59:59 首次购买包年包月云服务器 ...
- Docker学习笔记_进入正在运行的Docker容器
如何进入正在运行的Docker容器? 这里记录一种方法. 1.先查看container ID,并确认这个容器已经启动 docker ps -a #列出懿创建的所有容器 docker ps ...
- vmware workstation + kvm 部署
1.物理机BIOS设置里开启虚拟化功能 2.vm里面开启一下两个功能 3.找到存放该虚拟机的dir,找到以.vmx结尾的文件,增加一行 apic.xapic.enabled = "FALSE ...
- javascript总结1:js常见页面消息输出方式 alert confirm console prompt document
.1 js常见的输出方法: 1-1 alert 警告框 alert("js语法总结"); 1-2 confirm 确认方法 confirm("js语法总结"); ...
- Linux相关常用工具
Xshell Xshell可以在Windows界面下用来访问远端不同系统下的服务器,从而比较好的达到远程控制终端的目的. 通常需要通过vpn访问.建立vpn隧道可以通过FortiClient 或者 I ...
- 【leetcode】Move Zeroes
Move Zeroes 题目: Given an array nums, write a function to move all 0‘s to the end of it while maintai ...
- 匿名函数和lamda表达式
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...