jeudi 22 avril 2021

Open a input text if checkbox is checked (JQuery)

I'm trying to make a input that just open if checkbox is checked.

<script>
if ($('#flexCheckDefault').is(':checked')) {
    $('#test').prop('disabled')
}
</script>

<input type="checkbox" id="flexCheckDefault">
<input type="text" id="test" disabled>

I've try this but not got success. Help-me pls!




Aucun commentaire:

Enregistrer un commentaire