Find out if a text field is disabled or not:
var x = document.getElementById("myText").disabled;
Click the button to find out if the text field is disabled.
<!DOCTYPE html> <html> <body> Name: <input type="text" id="myText"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/* w ww. j a va 2s. co m*/ var x = document.getElementById("myText").disabled; document.getElementById("demo").innerHTML = x; } </script> </body> </html>