使用dtree.js在页面中显示一个树形目录,如果是(open all,即所有节点展开)则显示正常,如果是(close all,即所有节点折叠)则浏览器下方(一般是树形目录的第5行左右)显示空白,必须将鼠标移到该空白位置才能显示
求解决方法

解决方案 »

  1.   

    这个是css的问题,楼主你的close方法调用的时候css参与其中有问题,不是鼠标的问题,你可以加上border来调试
      

  2.   

    但是只有IE才会出现这个问题
    Chrome和FireFox都显示正常
      

  3.   

    .dtree {
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    }
    .dtree img {
    border: 0px;
    vertical-align: middle;
    }
    .dtree a {
    color: #333;
    text-decoration: none;
    }
    .dtree a.node, .dtree a.nodeSel {
    white-space: nowrap;
    padding: 1px 2px 1px 2px;
    }
    .dtree a.node:hover, .dtree a.nodeSel:hover {
    color: #333;
    text-decoration: underline;
    }
    .dtree a.nodeSel {
    background-color: #c0d2ec;
    }
    .dtree .clip {
    overflow: hidden;
    }
      

  4.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><head>
        <link rel="StyleSheet" href="dtree.css" type="text/css" /> 
        <script type="text/javascript" src="dtree.js"></script> 
    </head>
    <?php
    /**
     * Template Name: document
     */
    ?><!--PHP部分开始-->
    <?php get_header();
    ?>

    <div id="content">

    <?php get_sidebar();
    ?> <div id="contentwrapper">   <div id="header">&nbsp;</div> <div id="subheader"> <h1><?php bloginfo('description');
    ?></h1> </div> <?php include(TEMPLATEPATH . '/right_sidebar.php');
    ?><!--树形结构开始-->
    <div id="centercontent">
    <h2>文档中心</h2>
    <p align=RIGHT><a href="javascript: d.openAll();">全部展开</a> | <a href="javascript: d.closeAll();">全部折叠</a></p> <script type="text/javascript"> d = new dTree('d'); /*中间的树形结构部分省略*/
    document.write(d);
    d.openAll(); </script>
    </div> <!--树形结构结束--> </div><!-- end of contentwrapper -->

    </div><!-- end of content --><?php get_footer();
    ?>
      

  5.   

    dtree.js我就不贴了,太长
    而且网上可以找到的,参见这里http://destroydrop.com/javascripts/tree/
      

  6.   

    现在已确认,在IE7下访问正常,只有在IE6下出现该问题
      

  7.   

    问题已经修正了
    是float:right在该死的IE6下显示不正常,导致超出浮动显示的部分文本自动隐藏