js make input readonly

HTML
[Edit]
+
0
-
0

js make input readonly

1 2 3 4 5 6 7 8 9
<!doctype html> <html> <body> <input type="text" id="my-input" value="This is readonly input"> <script> document.querySelector('#my-input').readOnly = true; </script> </body> </html>