When the program reaches this stage, the Creator will find the advantage of the website information, and the information will be transferred to the client under XML data island, for the metadata, you do not need to go back to the server, that is, you do not need to write ASP programs. This method not only reduces server traffic, but also reduces traffic usage, and greatly improves the efficiency of traffic allocation. |
The author may ask, if the information in the table column finds the information that you want to see more frequently, that is, simply reading the information, can you? Of course, there is no problem. In the old saying, the information is already on the client side, next, as long as the xml dom object and DHTML are passed through, it will be able to expand the current resource, the previous ADO-XML-DOM3.asp modification example below: |
<Tr valign = "TOP" Onmouseover = "This. style. backgroundcolor = 'lightcyance '" Onmouseout = "This. style. backgroundcolor = 'white'">
|
<TD style = "cursor: hand; color: Blue; text-Decoration: underline" |
|
Onclick = "VBScript: showrecord"> |
<Span dataworks = "title_id"> </span> </TD> <TD> <span dataworks = "title"> </span> </TD> <TD> <span dataworks = "type"> </span> </TD> <TD> <span dataworks = "price"> </span> </TD> </Tr> |
|
Add a div tag under the table and specify the ID as message. Then, you can use the DIV tag to show the metadata as follows: |
|
<Div id = "message"> </div> |
|
Then add the following client program: |
Sub showrecord 'Get xml dom information of XML dataisland and put it in Doc Set Doc = DSO. xmldocument 'The selectnodes method of the xml dom object Doc is used to obtain the nodes of all the data points. Set nodes = Doc. selectnodes ("// Z: Row ") 'The location where the title_id selected for the vertex is located and in the DIV tag Show the XML content of a metric point For each node in nodes If node. getattribute ("title_id") = Window. event. srcelement. innertext then Message. innertext = node. xml Exit End if Next End sub |
|
In the above program, let the user click "showrecord" and then click "show record". First, get the xml dom information of XML dataisland and put it into the doc object, then, the selectnodes method is used to obtain the nodes set for all the data points, and then the information points selected by the for each cycle. |
Node. getattribute ("title_id") can be used to retrieve the content of the specified vertex, window. event. srcelement. innertext can be used to obtain the vertex selection information. After comparison, if it is correct, it will show the content of the vertex and jump out of the circle through the DIV mark, the results are as follows: |
|
|