window.location = "aaa.asp?aa"

解决方案 »

  1.   

    function clickHandle(){
             var text = this.getAttribute("text")
    var treeId = this.getAttribute("treeId");
    if (treeId < 115)
    document.write('<a href = "../head.asp?text">text</a>');
    //else if
    //document.write('<a href="../end.asp?text">text</a>');

    }<DSTreeRoot text="遥感资料" open="true" href="http://" treeId="123"> 
          <DSTree text="遥感简介" open="false"  href="" target="box" treeId="111"  > </DSTree>
          <DSTree text="相关法规" open="false" href="http://" target="box" treeId="112"> </DSTree>
      <DSTree text="基础知识" open="false" href="http://" target="box" treeId="113"> </DSTree>
      <DSTree text="相关文章" open="false" href="http://" target="box" treeId="114"> </DSTree>
      <DSTree text="分类查询" open="false" treeId="">
      <DSTree text="IKNOS" open="false" href="http://" target="box" treeId="221"> </DSTree>
               <DSTree text="QUICK BIRD" open="false" href="http://" target="box" treeId="222"> </DSTree>
       <DSTree text="SPOT1-4" open="false" href="http://" target="box" treeId="223"> </DSTree>
       <DSTree text="SPOT5" open="false" href="http://" target="box" treeId="224"> </DSTree>
       <DSTree text="Landsat7" open="false" href="http://" target="box" treeId="225"> </DSTree>
                <DSTree text="Landsat5" open="false" href="http://" target="box" treeId="226"> </DSTree>
        <DSTree text="资源卫星" open="false" href="http://" target="box" treeId="227"> </DSTree>
    </DSTree>
    </DSTreeRoot>
    我的意思是想点击text的值时,链接到相应的.asp文件上去,结果开始不执行.把else if去掉后,执行了,但是,它是在我点击的时候打开新窗口,里面有个文本链接"text".