Try it
Javascript
Jquery
Angular
Learn Angular
Learn Javascript
Learn Bootstrap
Learn jQuery
Ng-Readonly-2
In this either of two textbox become readonly on the basis of checkbox value because its value bind to open variable.
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> </head> <body ng-app> <div> <label>Readonly Last Name field : <input type="checkbox" ng-model="open"></label><br /> First Name:<input type="week" ng-readonly="!open" /><br /> Last Name:<input type="week" ng-readonly="open" /> </div> </body> </html>
Output
×
Save This try
Title
Description
In this either of two textbox become readonly on the basis of checkbox value because its value bind to open variable.