F
F
Fedor unknown2021-11-01 14:02:01
Java
Fedor unknown, 2021-11-01 14:02:01

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(){
       
    }


PS I will be glad to any advice and links!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Roo, 2021-11-01
@xez

js tools.
You assemble the form into an object, analyze it, send a request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question