国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術(shù)文章
文章詳情頁

angular.js - ng-show 表達式動態(tài)顯示

瀏覽:126日期:2024-09-30 14:07:39

問題描述

form input輸入框點擊搜索框顯示提示內(nèi)容,點擊其他地方,提示內(nèi)容消失

代碼見下

<form name='checkForm'> <p class='form-group'><label class='col-sm-3 control-label'>用 戶 名</label><p class='col-sm-8 account'> <input type='text' 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 ng-show='checkForm.account.$blured'><p class='input-tip'> <i></i> <span>!支持中文、字母、數(shù)字、“-”“_”的組合,4-20個字符</span></p> </p></form>

具體效果見下angular.js - ng-show 表達式動態(tài)顯示

當(dāng)我點擊搜索框時,提示內(nèi)容顯示angular.js - ng-show 表達式動態(tài)顯示

求指導(dǎo),謝謝

問題解答

回答1:

ng-blur和ng-focus的表達式寫反了吧?還有變量里邊有必要加入$blured么?隨便一個變量都能標(biāo)記是否獲得焦點吧,你再看看。

相關(guān)文章:
主站蜘蛛池模板: 原平市| 酒泉市| 竹山县| 涞水县| 图木舒克市| 英吉沙县| 任丘市| 鲁山县| 如东县| 泰和县| 崇明县| 莒南县| 清原| 政和县| 繁峙县| 商河县| 渭南市| 玉田县| 慈利县| 沿河| 海丰县| 中西区| 石嘴山市| 中西区| 宣威市| 崇左市| 兴业县| 灵山县| 清苑县| 望城县| 集贤县| 托里县| 会理县| 嘉荫县| 宜丰县| 镇宁| 北宁市| 五莲县| 巢湖市| 织金县| 遵义市|