This article is mainly on the implementation of jquery City Select dropdown box (sample code) for the introduction, the need for friends can come to the reference, I hope to help you.
Corresponding implementation of provinces and cities:< there are some provinces that are not packaged > more selective to determine the content of the city JSP code: Code as follows: <body> Province <select Name= "Prin" > <option>--Please select--</option> <option> Fujian </option> <option> Beijing </option> <option> Shandong </option> <option > Shanghai </option> </select> County, city <select id= "Sel2" > < option>--Please select--</option> </select> </body> JS code: Code as follows: function Appendshi (shi) {//string concatenation, stitching city var fjs= '; for (var i=0;i<shi.length;i++) { FJS + + ' <option> ' + shi[i]+ ' </option> '; } return fjs; } $ (function () { var Prince = [' Fujian ', ' Beijing ', ' Shandong ', ' Shanghai ']; var fjs = [' Xiamen ', ' Quanzhou ', ' Fuzhou ']; var bjs = [' Beijing ', ' Chaoyang District ', ' Haidian district ', ' Pinggu District ']; var SHS = [' Huangpu ', ' Changning district ', ' Baoshan ', ' Jiading ']; var SDS = [' Jinan ', ' Qingdao ', ' Yantai ', ' Rizhao ', ' Laiwu ', ' SSS ']; $ ("Select[name= ' Prin ')"). Change (function () { var Shi = $ ("#sel2");//Get second select var pri n = $ ("select[name= ' Prin '][select option:selected]")//The value of the selected identity var Newshisel = $ (' <select id= ' Sel2 ' >< option>--Please select--</option></select> ');/ if (prin.val () = = ' Fujian ') { newshisel.append ( Appendshi (FJS)); } if (prin.val () = ' Beijing ') { newshisel.append (Appendshi (BJS)) & nbsp } if (prin.val () = ' Shanghai ') { newshisel.append (Appendshi (SHS)); } if (prin.val () = = ' Shandong ') { newshisel.append (Appendshi (SDS)); }   ; Shi.replacewith (Newshisel); }); });