本篇文章给大家分享的是有关如何在Bootstrap中使用表单控件,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <!-- 使用最新的浏览器内核解析 --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- 移动设备优先 --> <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="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script> <scri></script> <![<endifdiv class="form-group"></endifdiv>]--> </head> <body> <div class="container"> <!-- 表单的栅格系统使用 form-horizontal div的栅格系统使用 row --> <form class="form-horizontal"> <div class="form-group"> <label class="col-md-2 control-label" for="username">用户名:</label> <div class="col-md-10"> <input id="username" class="form-control" type="text" name="username" value="" placeholder="请输入用户名"></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="请输入用密码"></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" >爱好:</label> <div class="col-md-10"> <div class="checkbox"> <label class="checkbox-inline"> <input type="checkbox">画画</input> </label> <label class="checkbox-inline"> <input type="checkbox">音乐</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">学历:</label> <div class="col-md-10"> <div class="radio"> <label class="radio-inline"> <input name="raido" type="radio">中学</input> </label> <label class="radio-inline"> <input name="raido" type="radio">大专</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">个人简历</label> <div class="col-md-10"> <textarea class="form-control" name="person" rows="5" placeholder="请输入"> </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>
以上就是如何在Bootstrap中使用表单控件,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注创新互联网站建设公司行业资讯频道。
另外有需要云服务器可以了解下创新互联建站www.cdcxhl.com,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站名称:如何在Bootstrap中使用表单控件-创新互联
本文网址:https://www.cdcxhl.com/article28/dhdijp.html
成都网站建设公司_创新互联,为您提供响应式网站、企业建站、虚拟主机、手机网站建设、全网营销推广、搜索引擎优化
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联