编辑下面的代码:【加编码】
<html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap Version2.0 form error example</title> <meta name="description" content="Bootstrap Version2.0 form error example from ziqiangxuetang.com."> <link href="/try/bootstrap/twitter-bootstrap-v2/docs/assets/css/bootstrap.css" rel="stylesheet"> </head> <body> <form class="form-horizontal"> <fieldset> <legend>Form validation error, warning and success</legend> <div class="control-group error"> <label class="control-label" for="inputError">Input with error</label> <div class="controls"> <input type="text" id="inputError"> <span class="help-inline">Please correct the error</span> </div> </div> <div class="control-group warning"> <label class="control-label" for="inputWarning">Input with warning</label> <div class="controls"> <input type="text" id="inputWarning"> <span class="help-inline">Something may have gone wrong</span> </div> </div> <div class="control-group success"> <label class="control-label" for="inputSuccess">Input with success</label> <div class="controls"> <input type="text" id="inputSuccess"> <span class="help-inline">Successfully entered</span> </div> </div> <div class="control-group success"> <label class="control-label" for="selectError">Select with success</label> <div class="controls"> <select id="selectError"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <span class="help-inline">Successfully selected</span> </div> </div> </fieldset> </form> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂