随风独醉
2014-11-13 09:38
类名和属性都可禁止按钮的默认行为?代码应该没问题
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>按钮状态——禁用状态</title> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> </head> <body> <form role="form"> <div class="form-group col-sm-8"> <input type="text" placeholder="Enter something"> </div> <div class="form-group col-sm-4"> <input class="btn btn-primary disabled" type="reset" value="重置"/> </div> </form> <form role="form"> <div class="form-group col-sm-8"> <input type="text" placeholder="Enter something"> </div> <div class="form-group col-sm-4"> <input class="btn btn-primary" disabled type="reset" value="重置"/> </div> </form> </form> <form role="form"> <div class="form-group col-sm-8"> <input type="text" placeholder="Enter something"> </div> <div class="form-group col-sm-4"> <input class="btn btn-primary" type="reset" value="重置"/> </div> </form> </body> </html>
版本3.3也是禁止的状态,添加.disabled就会阻止默认的行为
玩转Bootstrap(基础)
314546 学习 · 2275 问题
相似问题