<OBJECT ID="theTreeView" WIDTH="500" HEIGHT="600" CLASSID="CLSID:C74190B6-8589-11D1-B16A-00C0F0283628"></OBJECT><script>
theTreeView.Nodes.Add(null, 0, "R" + 0, "ROOT" + 0);
for (var i=1; i< 3000; i++)
{
theTreeView.Nodes.Add("R" + (i-1), 4, "R" + i, "ROOT" + i);
}
</script>

解决方案 »

  1.   

    太依赖客户端了。有些机器不恩能够显示。<OBJECT id=TreeView1 style="WIDTH: 100%; HEIGHT: 100%;"  
    classid=CLSID:C74190B6-8589-11D1-B16A-00C0F0283628   >  
    </OBJECT>
    <SCRIPT LANGUAGE="javascript"> 
     TreeView1.LineStyle=1;
     for(i=0;i<2;i++)
     {
    var n=TreeView1.Nodes.Add();
     for(j=0;j< 2;j++)
     {
    var   m= TreeView1.Nodes.Add(n,4);
    m.text="超级大笨狼" ;
     }
    n.text="超级大笨狼"  ;
    }
    </SCRIPT>
      

  2.   

    居然有style功能
    目前只试出display、width和height可以用
    <OBJECT id=TreeView1 style="WIDTH: 100%; HEIGHT: 100%;"  
    classid=CLSID:C74190B6-8589-11D1-B16A-00C0F0283628   >  
    </OBJECT>
    <SCRIPT LANGUAGE="javascript"> 
     TreeView1.LineStyle=1;
     for(i=0;i<2;i++)
     {
    var n=TreeView1.Nodes.Add();
     for(j=0;j< 2;j++)
     {
    var   m= TreeView1.Nodes.Add(n,4);
    m.text="超级大笨狼" ;
     }
    n.text="超级大笨狼"  ;
    } var obj=document.getElementById("TreeView1")
    obj.style.width=200
    obj.style.height=200
              for(i in obj.style)
             {
                   alert(i)
             }</SCRIPT>
      

  3.   

    posRight => 0
    backgroundRepeat => 
    borderTopStyle => 
    marginTop => 
    fontVariant => 
    listStylePosition => 
    backgroundPositionX => 
    lineHeight => 
    scrollbarHighlightColor => 
    overflowX => 
    paddingLeft => 
    borderLeftWidth => 
    padding => 
    listStyleType => 
    borderLeftColor => 
    display => 
    textDecorationLineThrough => false
    marginBottom => 
    textKashidaSpace => 
    borderCollapse => 
    textDecorationBlink => false
    scrollbarFaceColor => 
    backgroundAttachment => 
    borderRightStyle => 
    fontStyle => 
    textUnderlinePosition => 
    textIndent => 
    textDecorationOverline => false
    layoutGridMode => 
    right => 
    pageBreakAfter => 
    background => 
    filter => 
    borderColor => 
    posWidth => 200
    left => 
    minHeight => 
    accelerator => false
    rubyOverhang => 
    layoutGrid => 
    visibility => 
    verticalAlign => 
    borderBottomWidth => 
    scrollbarShadowColor => 
    textTransform => 
    lineBreak => 
    scrollbarArrowColor => 
    margin => 
    borderBottomColor => 
    borderTopWidth => 
    behavior => 
    letterSpacing => 
    layoutFlow => 
    font => 
    borderTopColor => 
    paddingBottom => 
    whiteSpace => 
    overflow => 
    borderBottomStyle => 
    cssText => WIDTH: 200px; HEIGHT: 200px
    width => 200px
    clip => 
    cursor => 
    fontSize => 
    imeMode => 
    backgroundPosition => 
    color => 
    paddingRight => 
    textAutospace => 
    pageBreakBefore => 
    direction => 
    bottom => 
    fontFamily => 
    unicodeBidi => 
    posHeight => 200
    posBottom => 0
    borderRightColor => 
    styleFloat => 
    textJustify => 
    backgroundColor => 
    posTop => 0
    zIndex => 0
    borderLeftStyle => 
    zoom => 
    listStyleImage => 
    wordSpacing => 
    textDecoration => 
    borderBottom => 
    layoutGridChar => 
    tableLayout => 
    border => 
    textAlign => 
    backgroundPositionY => 
    backgroundImage => 
    borderWidth => 
    borderTop => 
    textJustifyTrim => 
    scrollbar3dLightColor => 
    fontWeight => 
    scrollbarDarkShadowColor => 
    textAlignLast => 
    posLeft => 0
    borderRightWidth => 
    paddingTop => 
    wordBreak => 
    textOverflow => 
    rubyPosition => 
    borderStyle => 
    borderRight => 
    wordWrap => 
    position => 
    overflowY => 
    textDecorationUnderline => false
    layoutGridLine => 
    top => 
    textDecorationNone => false
    writingMode => 
    height => 200px
    scrollbarTrackColor => 
    listStyle => 
    scrollbarBaseColor => 
    marginRight => 
    marginLeft => 
    layoutGridType => 
    textKashida => 
    rubyAlign => 
    borderLeft =>
      

  4.   

    这个树代码也很短,还支持其他非ie浏览器:<html>
    <head>
    <title>Tree Menu</title>
    </head>
    <script language="javascript" type="text/javascript">
    <!--
    function tog(item){
       obj=document.getElementById(item);
       visible=(obj.style.display!="none");
       key=document.getElementById("x" + item);
       if (visible) {
         obj.style.display="none";
         key.innerHTML="+";
       } else {
          obj.style.display="block";
          key.innerHTML="-";
       }
    }
      
    function expall(item,yes){
       obj=document.getElementById(item);
       arr=obj.getElementsByTagName("UL");
       for (i=0;i<arr.length;i++) {
         key=document.getElementById("x" + arr[i].id);
         if(yes){
           arr[i].style.display="block";
           key.innerHTML="-";
         }else{
           arr[i].style.display="none";
           key.innerHTML="+";
         }
       }
    }
    //-->
    </script><div id='tree'>
    <a id='xall' href="javascript:tog('all');">+</a>
    <ul id='all' style="display:none;">
    <li>child1</li>
    <li ><a id='xfather' href="javascript:tog('father');">+</a>father
    <ul id='father' style="display:none;">
    <li>child2</li>
    <li>child3</li>
       </ul>
    </li>
    </ul>
    </div>
    <p><a href="javascript:expall('tree',1);">Expand All</a> 
    -- <a href="javascript:expall('tree',0);">Collapse All</a></p>
    <p>
    Extended from 
    <a href="http://www.codeproject.com/jscript/treemenu.asp">Marcelo Franco</a>'s tree menu.
    </p>
    </body>
    </html>