0

I followed lot of tutorials for find this. I had many answer with jsp. But i need do this with html

public class HomeController {

@RequestMapping("/home")
public String home(Model model){

int values[]={33,34,35,36};
return "index";

}

I need to pass this array values to the html drop down menu in the my index.html file. Please help me Thank you.

1 Answer 1

0

Java script will help you out here. You Can give AJAX call from Javascript or jQuery to get the response from server.

This link will help you to put data in select box from javascript use a javascript array to fill up a drop down select box

Read Something about AJAX http://api.jquery.com/jquery.ajax/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.