Microsoft's TreeView control client operation

zhaozj2021-02-16  197

Microsoft's TreeView control is rendered to the client. After the HTML component TreeView.htc under the webctrl_client folder of the web root directory, if, after installing Microsoft IEWebControls, you must confirm your Web root's WebCtrl_client to HTC and resource files. is it complete. The namespace of TreeView emptyware is Microsoft.Web.ui.WebControls, where the client output is TreeView.htc. Since it is an assembly, there is, attribute, method, event, etc., we can completely do some interactions with the server at the client. 1. Take an indexFunction getNodeIndex (Node) {var Strindex = ""; if (node! = Null) {if (Node.getaTRibute ("sibindex") == null) {if (node.parentelement == null) {RETURN NULL;} var col = node.parentelement.children.tags ("treenode"); var i = 0; while (col [i]! = Node) i ; Node.setttribute ("sibindex", i);} strIndex = node.getAttribute ( "sibIndex"); while (. node.getAttribute ( "parentElement") && node.getAttribute ( "parentElement") tagName.toLowerCase () == "treenode") {node = node.getAttribute ( " Parentelement "); if (" sibindex ") == NULL) Return Null; StrIndex = Node.GetaTribute (" sibindex ") ". " Strindex;}} Return Strindex;} 2. Take the node ID is Node INDEX for a value

Function GetNodeIndexByid (Ttree, Strid)

{

Var objcoll = ttree.getchildren ();

FOR (var i = 0; i

{

转载请注明原文地址:https://www.9cbs.com/read-8607.html

New Post(0)