Search code examples
htmlformsurl-routing

Can I auto-press a button on a webpage with a URL?


I want to be able to auto click this form button on my webpage:

<input value="Approve" class="btn" title="Approve" name="apv" type="submit">

by modifying the Url to the page before it loads. Is this possible?


Solution

  • If the <form> method-attribute is GET it is easy. Just use something like:

    http://www.yourdomain.com/page?apv=Approve
    

    If the used 'method' is something else, like POST. It is not possible by solely providing a 'special' URL.