Answer the question
In order to leave comments, you need to log in
How to use select box in a control?
I want when the user selects one of the options from the select box, a certain method is called in the controller.
But I have no idea how to do it, I googled but did not find the norms of information.
Question: how to implement this?
so far I only have a select box and a controller:
<p>Выбеите действие</p>
<form action="/list">
<select name="filetype" required="required">
<option value="eat">кушать</option>
<option value="sleep"> sleep</option>
<option value="drive">drive</option>
</select>
<input type="submit" value="Import" class="ui-button"/>
</form>
@GetMapping("/list")
public void result(){
}
Answer the question
In order to leave comments, you need to log in
js tools.
You assemble the form into an object, analyze it, send a request.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question