zoukankan      html  css  js  c++  java
  • 表单

    设置单选框时,记住将其name设为相同值,这样才能实现单选框!!

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"> 
        <title>Bootstrap 实例 - 复选框和单选按钮</title>
        <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">  
        <script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
        <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    </head>
    <body>
    <div class="checkbox">
        <label ><input type="checkbox" name="">篮球</label>
        <label ><input type="checkbox" name="">足球</label>
    </div>
    <div class="radio">
        <label ><input type="radio"  name="optionsRadio" checked>篮球</label>
        <label ><input type="radio"  name="optionsRadio">足球</label>
    </div>
    <div class="radio">
        <label>
            <input type="radio" name="optionsRadios" id="optionsRadios1" value="option1" checked> 选项 1
        </label>
    </div>
    <div class="radio">
        <label>
            <input type="radio" name="optionsRadios" id="optionsRadios2" value="option2">选项 2 - 选择它将会取消选择选项 1
        </label>
    </div>
    </body>
    </html>
  • 相关阅读:
    setTimeout详解
    【康娜的线段树】
    【[CQOI2016]手机号码】
    【[IOI2014]Wall 砖墙】
    【[1007]梦美与线段树】
    【[POI2010]ANT-Antisymmetry】
    【[HEOI2016/TJOI2016]排序】
    【[SCOI2016]背单词】
    【[HNOI2008]GT考试】
    【[JSOI2007]建筑抢修】
  • 原文地址:https://www.cnblogs.com/sunmarvell/p/9014428.html
Copyright © 2011-2022 走看看