how can you combine a form variable and a submit action with one click
I have a form on a website that has a dropdown box and instead of a normal submit button I need to have a button marked yes and one marked no.
So I want to store the value of the dropdown box and keep a note of whether the user pressed yes or no.
Normally I would have a drop down then a radio button for yes/no and then submit but I want to combine the action of clicking yes or no into both storing/passing 开发者_如何学JAVAthe value and submitting the form.
How could I do that? I don't mind some Javascript if necessary.
Only clicked submit buttons will be successful:
<input type="submit" name="foo" value="Yes">
<input type="submit" name="foo" value="No">
精彩评论