form input输入框
点击搜索框显示提示内容,点击其他地方,提示内容消失
代码见下
<form class="form-horizontal" name="checkForm">
<p class="form-group">
<label class="col-sm-3 control-label">用 户 名</label>
<p class="col-sm-8 account">
<input type="text" class="form-control showHide" placeholder="您的账户名和登录名"
ng-model="account"
name="account"
required="required"
ng-pattern="regularList.account"
ng-blur="checkForm.account.$blured = true;"
ng-focus="checkForm.account.$blured = false;"
autocomplete="off"/>
<span ng-class="{'right':(checkForm.account.$error.pattern),'error':checkForm.account.$valid}"></span>
</p>
</p>
<p class="tip-container" ng-show="checkForm.account.$blured">
<p class="input-tip">
<i></i>
<span>!支持中文、字母、数字、“-”“_”的组合,4-20个字符</span>
</p>
</p>
</form>
具体效果见下
当我点击搜索框时,提示内容显示
求指导,谢谢