How can we submit a form without a submit button?

Answer Posted / saiprasad

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

Is This Answer Correct ?    12 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to check an key is exists in array?

554


Why use php artisan serve?

503


A process can run only in the background. State Whether True or False?

626


How to convert a json string to an array in php?

557


How to read a file in php?

525






What is a php array?

498


What is rtrim php?

550


How do I install php?

598


What is delimiter php?

533


What is the difference between characters 34 and x34?

553


Why session timeout is important?

625


What are the difference between overloading and overriding in oops?

542


Why do we need abstract class in php?

508


armstrong number by using php while number is given by the keyboard.?

1701


How would you declare a function that receives one parameter name hello?

521