分类：电脑/网络-软件-网络软件
问题：给标签加上链接我想知道许多网站都有标签链接,这是如何做的呢,应该 
我想知道许多都有标签链接,这是如何做的呢,应该是动态加上去的吧,那么程序应该怎么写呢。告别是多个标签的问题。
回答：如下代码，我想在"类"和"10"上分别加上超链接 和      当点击"网络类"后打开 ，当点击"10"的时候打开      <html>     <head>     <title>Gene   Ontology   Tree   View</title>     <meta   http-equiv="Content-Type"   content="text/html;   charset=gb2312">     <meta   http-equiv="windows-Target"   content="_top">     <link   rel="stylesheet"   href="css/go.css"   type="text/css">     <style>   # {002;}  #treeBox   .hasItems{font- :24px;    2   0   0; :hand;color:#555555;    solid   #fffffa;}     #treeBox   .Items{ :0   2   0   0; :hand;color:#555555;    solid   #fffffa;}     </style>     <script>     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","<br>")         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<nodes.length;cn.appendChild(createTree(nodes[i++],sd+1)));             nodeObj.appendChild(cn);         }         else         {              l.tags("img")[0].src   ="image/ g";         }         return   nodeObj;     }     </script>         </head>     <body>     <table   width=1004   cellspacing=0   cellpadding=0>           <tr   height=80>                 <td> </td>           </tr>     </table>         <xml   id=menuXML>     <?xml   version="1.0"   encoding="GB2312"?>     <TreeRoot   text="计算机图书"   open="true"   url1=' '   url2=' '>         <myTree   text='网络类　　10'   open='false'>     <myTree   text='数据库　　20'   open='false'   />     <myTree   text='C语言   　　30'   open='false'   />         </myTree>     </TreeRoot>     </xml>     <script>window.onload   =   initTree;</script>     <table>     <tr><td   id=treeBox   style=" :200px;    solid   #cccccc;    3   3   5;"   valign=top>     </td></tr>     </table>     </body>     </html>