แก้ไขโค้ด:
เห็นผล »
ลองตัวเอง - ©
w3ii.com
<
!DOCTYPE
html
>
<
html
>
<
script
src
="/lib/angular-1.4.8.min.js"
>
<
/script
>
<
body
ng-app
=""
>
Click here to make the input field readonly:
<
input
type
="checkbox"
ng-model
="all"
>
<
br
>
<
br
>
<
input
type
="text"
ng-readonly
="all"
>
<
/body
>
<
/html
>
<!DOCTYPE html> <html> <script src="/lib/angular-1.4.8.min.js"></script> <body ng-app=""> Click here to make the input field readonly:<input type="checkbox" ng-model="all"><br> <br> <input type="text" ng-readonly="all"> </body> </html>