给标签加上链接我想知道许多网站都
如下代码,我想在"网络类"和"10"上分别加上超链接 和
当点击"网络类"后打开 ,当点击"10"的时候打开
Gene Ontology Tree View
# {002;} #treeBox 。 hasItems{font- :24px; 2 0 0; :hand;color:#555555; solid #fffffa;}
#treeBox 。Items{ :0 2 0 0; :hand;color:#555555; solid #fffffa;}
var HC = "color:#990000; ...全部
如下代码,我想在"网络类"和"10"上分别加上超链接 和
当点击"网络类"后打开 ,当点击"10"的时候打开
Gene Ontology Tree View
# {002;} #treeBox 。
hasItems{font- :24px; 2 0 0; :hand;color:#555555; solid #fffffa;}
#treeBox 。Items{ :0 2 0 0; :hand;color:#555555; solid #fffffa;}
var HC = "color:#990000; solid #cccccc";
var SC = "background-color:#efefef; solid #cccccc;color:#000000;";
var IO = null;
function initTree()
{
var rootn = cumentElement;
var sd = 0;
document。
onselectstart = function(){return false;}
eeBox。appendChild(createTree(rootn,sd));
}
function createTree(thisn,sd)
{
var nodeObj = eateElement("span");
var upobj = eateElement("span");
with(upobj)
{
rginLeft = sd*20;
className = thisn。
hasChildNodes()?"hasItems":"Items";
innerHTML = "" + tAttribute("text") +"";
onmouseup = function()
{
if(event。
button != 1) return;
if( tAttribute("cn"))
{
tAttribute("open",! tAttribute("open"));
yle。
display = tAttribute("open")?"inline":"none";
l。tags("img")[0]。src = tAttribute("open")?"image/ g":"image/ g";
}
if(IO)
{
ntimeStyle。
cssText = "";
tAttribute("selected",false);
}
IO = this;
tAttribute("selected",true);
ntimeStyle。
cssText = SC;
}
onmouseover = function()
{
if( tAttribute("selected"))return;
ntimeStyle。
cssText = HC;
}
onmouseout = function()
{
if( tAttribute("selected"))return;
ntimeStyle。
cssText = "";
}
}
nodeObj。appendChild(upobj);
sertAdjacentHTML("beforeEnd","")
if( tAttribute("href") != null){
tAttribute("href", tAttribute("href"));
}
if(thisn。
hasChildNodes())
{
var i;
var nodes = ildNodes;
var cn = eateElement("span");
tAttribute("cn",cn);
if( tAttribute("open") != null)
{
tAttribute("open",( tAttribute("open")=="true"));
tAttribute("cn")。
style。display = tAttribute("open")?"inline":"none";
if( ! tAttribute("open")) l。
tags("img")[0]。src ="image/ g";
}
for(i=0;i
window。
onload = initTree;
。收起