本文實例講述了AngularJS實時獲取并顯示密碼的方法。分享給大家供大家參考,具體如下:
1、設(shè)計源碼
<!doctype html> <html> <head> <meta charset="utf-8"> <title>www.gxlcms.com - AngularJS獲取密碼</title> <script type="text/javascript" src="angular.min.js"></script> </head> <body> <div ng-app=""> <p>密碼:<input type="password" ng-model="password" maxlength="12"></p> <p ng-bind="password"></p> </div> </body> </html>
2、實現(xiàn)結(jié)果
3、實例說明
當(dāng)輸入框中輸入“123456”,下面也跟著顯示“123456”;綁定式顯示
更多關(guān)于AngularJS相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《AngularJS指令操作技巧總結(jié)》、《AngularJS入門與進(jìn)階教程》及《AngularJS MVC架構(gòu)總結(jié)》
希望本文所述對大家AngularJS程序設(shè)計有所幫助。
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com