Wednesday, 4 March 2015

How To Submit a form without a submit button?

simple just use following code save it as  example.html:

<form name="myform" action="handle-data.php">
Search: <input type='text' name='query' />
<a href="javascript: submitform()">Search</a>
</form>
<script type="text/javascript">
function submitform()
{
  document.myform.submit();
}
</script>

No comments:

Post a Comment