我下了simpleTree树的源码下来,运行它的源码  在IE和Firefox下都正常。
为什么我自己模仿它的例子写的就只能在ie下运行,在firefox下就会出错?testTree.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="simpleTree.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.simple.tree.js"></script>
<script type="text/javascript">
var simpleTreeCollection;
$(document).ready(function(){
simpleTreeCollection = $(".simpleTree").simpleTree({
animate:true,
autoclose: false,
drag:true
});
});
</script>
</head><body><ul class="simpleTree">
<li class="root" id='1'><span>标题</span></li>
<ul>
<li class="open" id='2'><span>根</span>
<ul class="ajax">
<li id='4'>{url:loadTree.html}</li>
</ul>
</li>
</ul>
</ul>
</body>
</html>
loadTree.html<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<li id="5"><span class="text">11</span></li>
<li id="6"><span class="text">12</span>
<ul>
<li id="7"><span class="text">121</span></li>
<li id="8"><span class="text">122</span></li>
<li id="9"><span class="text">123</span></li>
</ul>
</li>
<li id="10"><span class="text">13</span></li>
<li id="11"><span class="text">14</span></li>
</body>
</html>

解决方案 »

  1.   

    不是报错,是在firefox里面只显示了  标题的小图片和 “标题” “根” 的文字,其他都不显示
    在ie里就能完全显示根和他里面的子项目
      

  2.   

    没人用过  simpleTree么?
      

  3.   


    <ul class="simpleTree">
        <li class="root" id='1'><span>标题</span>
        <ul>    
            <li class="open" id='2'><span>根</span>
                <ul class="ajax">
                    <li id='4'>{url:loadTree.html}</li>
                </ul>    
            </li>
        </ul>
    </li>
    </ul>