Answers for "jQuery reset input"

11

form reset jquery

$('#form_id').trigger("reset");
Posted by: Guest on June-26-2020
9

jquery reset form

$('.login-form').trigger("reset");
Posted by: Guest on May-13-2020
2

clear input field jquery

$('#shares').val('');
Posted by: Guest on July-18-2020
0

how to reset form values in jquery

$('#form_id')[0].reset();
Posted by: Guest on September-04-2021
0

clear value input jquery

<body>
    <form method="" action="">
        <input type="text" name="email" class="input" />
        <input type="submit" value="Sign Up" class="button" />
    </form>
</body>

<script>
    $(document).ready(function() {
        $(".input").val("Email Address");
        $(".input").on("focus", function() {
            $(".input").val("");
        });
        $(".button").on("click", function(event) {
            $(".input").val("");
        });
    });
</script>
Posted by: Guest on July-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language