1、设计源码
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>AngularJS获取密码</title>
<script type="text/javascript" src="angular.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、实现结果
3、实例说明
当输入框中输入“123456”,下面也跟着显示“123456”;绑定式显示