Javascript – How to pass variable from my JS file to Spring Boot Controller?
below is the code for selection of State and City in my view page( I am using thymeleaf 3) <div class="col-md-2"> <label for="inputCity" class="form-label">State</label> <select onchange="print_city('state', this.selectedIndex);" id="sts" name="stt" class="form-control" required> </select> </div> <div class="col-md-2"> <label for="inputCity" class="form-label">City</label> <select id="state"…