I have a question for Html select.

Asked 1 weeks ago, Updated 1 weeks ago, 2 views

What I want to make is to make an option in the selection of another page when I press the button.

Question 1. First of all, it's not possible to make it. The problem is to create an option by turning the repetitive statement with Js code.

Question 2. Even if it is made, it should be saved as a different value in the DB, but if you turn the repetition sentence, it has the same value, so it is a problem whether you turn the repetition sentence or not.

Question 3. In conclusion, it is not necessary to add an option as many as the number of values, but if you click the button, an option must be created immediately so that it can be put in the DB well later, but it can't ㅠ<

This is send.jsp

<form action=“get.jsp” method=“post”>
<input type="submit" name="aaa" value="Rice">
<input type="submit" name="aaa" value="bread">
<input type="submit" name="aa" value="hash">
<input type="submit" name="aaa" value="Sushi">

——————————————————————————— This is get.jsp

String name = request.getParameter(“aaa”);

String bbb[]=request.getParameterValues(“aaa”);
for (string str:bbb){
out.print(str+” “);

It's the code I've made so far, but it's possible to press the button and turn it over to another page. But I don't know how to put this value in select. I receive js but select is html..

I've searched a lot and I've been holding this for a week. Please help me (Crying)

html javascript select post

2022-09-20 13:14

1 Answers

The problem is that the Send part doesn't go up, but I think I received it and put the value in select.

2022-09-20 13:14

If you have any answers or tips

© 2022 pinfo. All rights reserved.