案例:AngularJS案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<script src="/js/angular.js1.4.6/angular.min.js"></script>
6
</head>
7
<body>
8
9
<div ng-app="" ng-init="mySwitch=true">
10
<p>
11
<button ng-disabled="mySwitch">点我!</button>
12
</p>
13
<p>
14
<input type="checkbox" ng-model="mySwitch"/>按钮
15
</p>
16
<p>
17
{{ mySwitch }}
18
</p>
19
</div> 
20
21
</body>
22
</html>
23

 运行结果 
 北美留学生论坛