How to split the data? What do you do with the data?

clipboard.png
when I click the button to select a region, there will be three addresses of provinces, cities and regions. I got the value through .html, but the parameters required by the background are separated by city and county. What do I do with the data segmentation I got. Pass it alone in the form of passing parameters

Feb.27,2021

The value obtained by

is a string. Call the delimited function of the string

str.split(' ')

get provinces, cities and autonomous regions


var list = string. Split (')
and then use list [0], list [1], list [2] to extract the corresponding values


directly with split, and then take provinces, cities and counties according to the array order

.
Menu