How to realize menu Linkage with XML
This article mainly shows you "how XML realizes menu linkage". The content is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and learn this article "how XML realizes menu linkage".
Code:
Citys.xml
Jiujiang Nanchang Lushan Jingdezhen Beijing West Juyongguan Qinghua Garden Zhoukou shop Fuzhou Xiamen Zhangzhou Lanzhou Luoman Jiayuguan Guangzhou Shenzhen Dongguan Shipai Hefei Huangshan Jiulonggang Maanshan
CitySelect.htm
Custom function: ChooseState
(read the name of the province in the XML data and add it to the drop-down list of SelState)
Function ChooseState () {var source; var sourceName = "Citys.xml"; var source = new ActiveXObject ('Microsoft.XMLDOM'); / / create an MSXML parser instance source.async = false; source.load (sourceName); / / load the XML document root = source.documentElement; / / set the document element to the root node element sortField=root.selectNodes ("/ / @ name"); / / search all nodes for (var iParser 0) that contain name in the attribute I above are all the contents of the article "how to achieve menu connection in XML". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!