Method for setting cascading menu of XML based on Javascript
A menu and cascading technology, applied in the field of web development, can solve problems such as linkage display, and achieve the effect of convenient interaction, easy analysis and processing, and simple operation
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0020] See figure 1 Shown, the present invention a kind of method based on the XML setting cascade menu of Javascript, specifically comprises the following several steps:
[0021] Step 1: Use Javascrip to parse the XML object data, you need to load this XML file, and Javascrip loads and parses the XML file through XMLDOM;
[0022] Step 2: Use Javascrip to obtain the first-level menu node value of the Web front end according to document.getElementById;
[0023] Step 3: According to the value of the front-end first-level menu node, go to the XML document to access the node according to the method of using xmlDocument.selectSingleNode and getElementsByTagName(xPath), and you can directly search and obtain the corresponding second-level menu node through xPath;
[0024] Step 4: Use the second-level menu node parameters obtained in the first step to create an option node on the Web page according to document.createElement("option");
[0025] Step 5: Add the created option node to...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 
