Javascript examples for DOM HTML Element:Input Text
Input Text readOnly Property - Find out if a text field is read-only or not:
<!DOCTYPE html> <html> <body> Name: <input type="text" id="myText"> <button onclick="myFunction()">Test</button> <script> function myFunction() {// ww w.j a v a2s. c o m var v = document.getElementById("myText").readOnly; console.log(v); } </script> </body> </html>