Bootstrap表單控件使用方法詳解
表單作為Bootstrap的核心內(nèi)容,主要功能是用來(lái)與用戶(hù)做交流的一個(gè)網(wǎng)頁(yè)控件,良好的表單設(shè)計(jì)能夠讓網(wǎng)頁(yè)與用戶(hù)更好的溝通。

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <!-- 使用最新的瀏覽器內(nèi)核解析 --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- 移動(dòng)設(shè)備優(yōu)先 --> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <!--[if lt IE 9]> <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script> <scri></script> <![<endifdiv class="form-group"></endifdiv>]--> </head> <body> <div class="container"> <!-- 表單的柵格系統(tǒng)使用 form-horizontal div的柵格系統(tǒng)使用 row --> <form class="form-horizontal"> <div class="form-group"> <label class="col-md-2 control-label" for="username">用戶(hù)名:</label> <div class="col-md-10"> <input id="username" class="form-control" type="text" name="username" value="" placeholder="請(qǐng)輸入用戶(hù)名"></input> </div> </div> <div class="form-group"> <label class="col-md-2 control-label" for="password">密 碼:</label> <div class="col-md-10"> <input id="password" class="form-control" type="password" name="password" value="" placeholder="請(qǐng)輸入用密碼"></input> </div> </div> <div class="form-group"> <label class="col-md-2 control-label" for="file">上傳文件:</label> <div class="col-md-10"> <input id="file" type="file" name="file" value=""></input> </div> </div> <div class="form-group"> <label class="col-md-2 control-label" >愛(ài)好:</label> <div class="col-md-10"> <div class="checkbox"> <label class="checkbox-inline"> <input type="checkbox">畫(huà)畫(huà)</input> </label> <label class="checkbox-inline"> <input type="checkbox">音樂(lè)</input> </label> <label class="checkbox-inline"> <input type="checkbox">體育</input> </label> </div> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">學(xué)歷:</label> <div class="col-md-10"> <div class="radio"> <label class="radio-inline"> <input name="raido" type="radio">中學(xué)</input> </label> <label class="radio-inline"> <input name="raido" type="radio">大專(zhuān)</input> </label> <label class="radio-inline"> <input name="raido" type="radio">研究生</input> </label> </div> </div> </div> <div class="form-group"> <label class="col-md-2 control-label">個(gè)人簡(jiǎn)歷</label> <div class="col-md-10"> <textarea class="form-control" name="person" rows="5" placeholder="請(qǐng)輸入"> </textarea> </div> </div> <div class="col-md-10 col-md-offset-2"> <button type="button" class="btn btn-success">提交表單</button> </div> </form> </div> <!-- jQuery first, then Bootstrap JS. --> <script src="bootstrap/js/jquery.min.js"></script> <script src="bootstrap/js/bootstrap.js"></script> </body> </html>
如果大家還想深入學(xué)習(xí),可以點(diǎn)擊這里進(jìn)行學(xué)習(xí),再為大家附3個(gè)精彩的專(zhuān)題:
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- 基于Bootstrap+jQuery.validate實(shí)現(xiàn)Form表單驗(yàn)證
- JS組件Form表單驗(yàn)證神器BootstrapValidator
- 全面解析Bootstrap表單使用方法(表單按鈕)
- Bootstrap實(shí)現(xiàn)登錄校驗(yàn)表單(帶驗(yàn)證碼)
- 全面解析Bootstrap表單使用方法(表單樣式)
- 實(shí)用又漂亮的BootstrapValidator表單驗(yàn)證插件
- 基于bootstrap插件實(shí)現(xiàn)autocomplete自動(dòng)完成表單
- Bootstrap每天必學(xué)之表單
- Bootstrap導(dǎo)航欄各元素操作方法(表單、按鈕、文本)
- 全面解析Bootstrap表單使用方法(表單控件)
相關(guān)文章
JS效率個(gè)人經(jīng)驗(yàn)談(8-15更新),加入range技巧
JS效率個(gè)人經(jīng)驗(yàn)談(8-15更新),加入range技巧...2007-01-01
用javascript實(shí)現(xiàn)的電信鐵通(網(wǎng)通)自動(dòng)跳轉(zhuǎn)源代碼
用javascript實(shí)現(xiàn)的電信鐵通(網(wǎng)通)自動(dòng)跳轉(zhuǎn)源代碼...2007-11-11
JavaScript中的惰性載入函數(shù)及優(yōu)勢(shì)
這篇文章主要介紹了JavaScript中的惰性載入函數(shù)及優(yōu)勢(shì),本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-02-02
JavaScript實(shí)現(xiàn)組件化和模塊化方法詳解
這篇文章主要介紹了JavaScript實(shí)現(xiàn)組件化和模塊化方法,模塊化主要是指一個(gè)JS文件就是一個(gè)模塊,向外提供特定功能的程序,組件化的中心思想其實(shí)跟模塊化是大同小異的,感興趣想要詳細(xì)了解可以參考下文2023-05-05
微信小程序開(kāi)發(fā)之大轉(zhuǎn)盤(pán) 仿天貓超市抽獎(jiǎng)實(shí)例
本篇文章主要介紹了微信小程序開(kāi)發(fā)之大轉(zhuǎn)盤(pán) 仿天貓超市抽獎(jiǎng)實(shí)例,這里整理了詳細(xì)的代碼,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下。2016-12-12
jscript之List Excel Color Values
jscript之List Excel Color Values...2007-06-06
JS獲取經(jīng)緯度并根據(jù)經(jīng)緯度得到城市信息簡(jiǎn)單示例
前端時(shí)間剛好使用了百度地圖的js api定位獲取用戶(hù)當(dāng)前經(jīng)緯度并獲取當(dāng)前詳細(xì)位置的功能,為了方便下次找起來(lái)方便一些自己在這里記錄一下,這篇文章主要給大家介紹了關(guān)于JS獲取經(jīng)緯度并根據(jù)經(jīng)緯度得到城市信息的相關(guān)資料,需要的朋友可以參考下2023-11-11

