亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Preparations for three-level linkage in JavaScript development

The front-end is done, and the next step is our JavaScript. Before writing, we need to define the array of provinces and cities we need, as shown below:

<script>
   //聲明省
   var oProc = ["安徽","上海","山東"];  //直接聲明array
   //聲明市
   var oCity = [
       ["合肥","淮南","蕪湖"],
       ["浦東","閔行","浦西"],
       ["濟(jì)南","青島","棗莊"]
   ];
   //聲明區(qū)
   var oDist = [
       [
           ["政務(wù)區(qū)","廬陽區(qū)","蜀山區(qū)"],
           ["田家庵區(qū)","大通區(qū)","九龍崗區(qū)"],
           ["鏡湖區(qū)","鳩江區(qū)","三山區(qū)"]
       ],
       [
           ["浦東1","浦東2","浦東3"],
           ["閔行1","閔行2","閔行3"],
           ["浦西1","浦西","浦西3"]
       ],
       [
           ["歷下區(qū)","天橋區(qū)","長(zhǎng)清區(qū)"],
           ["市南區(qū)","市北區(qū)","李滄區(qū)"],
           ["薛城區(qū)","市中區(qū)","嶧城區(qū)"]
       ]
   ];
</script>

This is just a simple For example, when the actual work involves the whole province or the whole country, then the workload will be relatively large. This is what I call preparation work. But don’t worry, there will be examples written by other programmers, and we can just use them when the time comes. Just here to let everyone know.

Declare the province, city, and district in the form of an array, and then use it.

Continuing Learning
||
<script> //聲明省 var oProc = ["安徽","上海","山東"]; //直接聲明array //聲明市 var oCity = [ ["合肥","淮南","蕪湖"], ["浦東","閔行","浦西"], ["濟(jì)南","青島","棗莊"] ]; //聲明區(qū) var oDist = [ [ ["政務(wù)區(qū)","廬陽區(qū)","蜀山區(qū)"], ["田家庵區(qū)","大通區(qū)","九龍崗區(qū)"], ["鏡湖區(qū)","鳩江區(qū)","三山區(qū)"] ], [ ["浦東1","浦東2","浦東3"], ["閔行1","閔行2","閔行3"], ["浦西1","浦西","浦西3"] ], [ ["歷下區(qū)","天橋區(qū)","長(zhǎng)清區(qū)"], ["市南區(qū)","市北區(qū)","李滄區(qū)"], ["薛城區(qū)","市中區(qū)","嶧城區(qū)"] ] ]; </script>
submitReset Code