Answers for "jquery reset is input not selected"

C#
0

jquery reset form fields

<script type="text/javascript">
if (window.jQuery) {
  jQuery(function ($) {
    $("form#myForm").ResetFormFields();
  }
}
</script>
Posted by: Guest on August-13-2021
1

how can prevent the empty input in jquery

$('#form').submit(function() {
    if ($.trim($("#email").val()) === "" || $.trim($("#user_name").val()) === "") {
        alert('you did not fill out one of the fields');
        return false;
    }
});
Posted by: Guest on April-19-2021

C# Answers by Framework

Browse Popular Code Answers by Language