Pull-up box linkage

zhaozj2021-02-16  45

There are three files composition: select.js; city.jsp; test.jsp 1.select.js file. Perform JS Operation Function Clearselect (OBJ) {ClearList (Obj); Obj.Options [0] = New Option ("No Answer", "0");} Function ChangeLocation (Obj, LocationID, Arr) {Clearselect (OBJ); Alert (Arr.Length "=" locationID); for (i = 0; I <% @ page import = "dw.utitily. *"%> <% @ page import = "java.sql. *" %> <% String sqlcity = "select code, codename, codefather from test_city order"; result rescity = jdbc.executeQuery (SQLCITY);%> // put the city's information in array var vcity = new array () <% for (int i = 0; i

VCITY [<% = I%>] = new array ("<% = Rescity.getstringnonull (i, 0)%>", "<% = Rescity.getstringnonull (i, 1)%>", "<% = Rescity .ge tstringnonull (i, 2)%>); <%}%> 3.test.jsp file. Specific selection operation