Submit a form with a button (HTML)
So I am making a program that would post on a webpage, to submit the form it has to "click" on a button :
< button class="form" type="submit" > Send < /button >
From what I know (not much) to submit a POST request when it's INPUT you must do name=value, but I don't know how I could do that with a submit button.
Basically I wanna know what I must POST to the website so that it submits the form :p
Thank you in advance guys !
Here's basic syntax for a form:
<form>
<input name="name" type="text"/>
<button type="submit"> Send </button>
</form>
Whatever backend you are using should be able to read POST request parameter "name" to read what that form contains.
If you're trying to make a form with just that one button, you can do that by just skipping that input
element. Of course, there will be no data in that post request, but you can add the action
attribute to the containing form and set it equal to a URL where you would like to redirect the user on button click.
上一篇: 如何使用SQL文件流式传输win32 API并支持WCF流式传输
下一篇: 使用按钮提交表单(HTML)