How to submit a form using JavaScript by clicking a link?
Submit a form using JavaScript by clicking a link.
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
<form name="f1" action="index.php">
Enter text here: <input type='text' name='q' />
<a href="javascript: Getdata()">Get Data</a>
</form>
<script type="text/javascript">
function Getdata()
{
document.f1.submit();
}
</script>