vendredi 9 mars 2018

Read Only Text Column With Checkbox in HTML Javascript

I made a very easy one html input column. I added javascript to it with a checkbox in it. when i clicked check box checked i want write the text or unchecked the text box read only how to solve my problem.. give for example for my code

<input type="text" id="inputID" value="abc"></input>

    <input type="checkbox" id="myCheck" checked>

    <script>
   document.getElementById('inputID').readOnly = true;

    </script>




Aucun commentaire:

Enregistrer un commentaire