Fix a small bug with Axin Xtree

xiaoxiao2021-03-06  40

First of all, severely declare that Ashi's Xtree is still very easy to use, and my admiration for Ashi is like the flood of the Yellow River, it is not a cleaner!

Problem: In the process of use, I found that every load tree will jump through the OpenURL function in Xtree.htc to the first link of the ID 0 in the database, although not found to be called when loading TREE. OpenURL functions but change this function to solve this problem code as follows:

Function OpenURL (EL)

{

Var oa = getElement (getElement (EL, 'SPAN'), 'A');

IF (OA)

{

IF ("OPENED")! = null)

{

IF ("OPENED")! = OA.href)

{

SetCookie ("OPENED", OA.href;

WINDOW.OPEN (OA.HREF, OA.TARGET);

}

}

Else

{

SetCookie ("OPENED", OA.href;

}

}

}

The principle is to define a cookie named OPENED Cookie by recording the status control of the OPENED to disable the OpenURL function when loading TREE.

Declare my admiration of Ashi! ! !

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

New Post(0)