• No categories
Jun
1
2011

reset a form in jquery

you can download latest version of jquery from here [download jquery]. You can use below demo code to reset a html form. Copy and insert the following code to create a form and jquery code.
<script>
$(document).ready(function() {
$(“#reset”).click(function() {
$(“#myform”).reset();
});
});
</script>
<form id=”myform” method=”post” action=”#”>
<input type=”text” name=”n1″ size=”15″ />
<input type=”text” name=”n2″ size=”15″ />
<input type=”text” name=”n3″ size=”15″ />
<input type=”reset” name=”reset” id=”reset” value=”reset” />
</form>

About the Author:

Comments are closed.