Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

CLEAR FORM using jquery

/*if form id is mkform */
 $('#mkform')[0].reset();
Comment

how to reset form values in jquery

$('#form_id')[0].reset();
Comment

jquery clear form values

$(".reset").click(function() {
    $(this).closest('form').find("input[type=text], textarea").val("");
});
Comment

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>
Comment

PREVIOUS NEXT
Code Example
Javascript :: between in mongodb 
Javascript :: how to code number must be smaller than in javascript 
Javascript :: nock CORS error 
Javascript :: replace all dashes to slashes using jquery in a string 
Javascript :: check if item exists in localstorage javascript 
Javascript :: createdAt expires mongoose 
Javascript :: react useeffect async 
Javascript :: javascript print object pretty 
Javascript :: js create timestamp with 10 digits 
Javascript :: js check proccess alive 
Javascript :: remove white spaces 
Javascript :: jquery remove keypress event 
Javascript :: await inside map js 
Javascript :: javascript click event notifications 
Javascript :: append after element jquery 
Javascript :: jquery find id with string at end 
Javascript :: number to binary javascript 
Javascript :: docker react js 
Javascript :: html javascript call function after pressing enter 
Javascript :: document jquery 
Javascript :: map with promise.all 
Javascript :: get javascript min date 
Javascript :: remove trailing slash javascript 
Javascript :: setinterval break 
Javascript :: code for adding new elements in javascriipt js 
Javascript :: js selection box excel node 
Javascript :: chrome is not defined 
Javascript :: add leading zeros javascript 
Javascript :: convert a string to a number in js 
Javascript :: bootstrap cdn for react 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =