一,页面上有一个checkbox和一个文本框。切换checkbox能对文本框输入文本与否:
学习angularjs的ng-hide和ng-disabled

 

<input type="checkbox" ng-model="ckSwitch"  />
        <input id="Text1" type="text" ng-disabled="!ckSwitch" ng-model="textValue" />
Html Code

相关文章: