I am working with the following HTML form:
<form method = 'POST' action = '/python/stats/'>
<select name = 'team'>
<option value = 'team1'> team1 </option>
<option value = 'team2'> team2 </option>
<option value = 'team3'> team3 </option>
</select>
<select name = 'player'>
<option value = 'player1'> player1 </option>
<option value = 'player2'> player2 </option>
<option value = 'player3'> player3 </option>
</select>
<input type = 'submit' value = "Update">
</form>
The action /python/stats requires 2 parameters. How can I edit this form (to javascript?) so that the action is called each time either of the selects is changed?
the
action
property in the form tag specifies the location tosubmit
the form to. To do this with anonchange
event is, you can do a form submit in the event.