html - Why reset button does not work here? -


in below html code,

<h1>our contact form</h1>         <hr>         <form action="process_form.php" method="get">             <p>             title: <input type="radio" name="title" value="mr"> mr                     <input type="radio" name="title" value="mrs"> mrs             </p>             <p>                 first name:<br>                 <input type="text" size="15" name="first_name">             </p>             <p>                 sur name:<br>                 <input type="text" size="15" name="surname">             </p>             <p>                 gender:                 <select>                     <option value="select">select gender</option>                     <option value="male">male</option>                     <option value="female">female</option>                 </select>             </p>             <p>                 <input type="checkbox" name="newsletter"> subscribe news letter             </p>             <p>                 <input type="reset" name="reset" value="reset">                 <input type="submit" name="submit" value="submit">             </p>                 </form> 

if comment form element(only), in above code, then, reset button not reset data.

can me understand, why?

if comment form element(only), in above code, then, reset button not reset data.

the reset functionality far read question part of form data. commenting form element function not work. if comment form , try submit ?!? if have return value in function , comment function(only) work ?

the input element type attribute value "submit" represents button submitting form.

the input element type attribute value "reset" represents button resetting form.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -