本文實(shí)例講述了AngularJS實(shí)時(shí)獲取并顯示密碼的方法。分享給大家供大家參考,具體如下:
1、設(shè)計(jì)源碼
<!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、實(shí)現(xiàn)結(jié)果
3、實(shí)例說(shuō)明
當(dāng)輸入框中輸入“123456”,下面也跟著顯示“123456”;綁定式顯示
更多關(guān)于AngularJS相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《AngularJS指令操作技巧總結(jié)》、《AngularJS入門(mén)與進(jìn)階教程》及《AngularJS MVC架構(gòu)總結(jié)》
希望本文所述對(duì)大家AngularJS程序設(shè)計(jì)有所幫助。
聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com