jQuery的simpleTree树的问题

forgetbefore 2010-01-11 03:10:49
我下了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>
...全文
340 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
aloneno1 2010-01-20
  • 打赏
  • 举报
回复

<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>

forgetbefore 2010-01-12
  • 打赏
  • 举报
回复
没人用过 simpleTree么?
forgetbefore 2010-01-11
  • 打赏
  • 举报
回复
不是报错,是在firefox里面只显示了 标题的小图片和 “标题” “根” 的文字,其他都不显示
在ie里就能完全显示根和他里面的子项目
antony1029 2010-01-11
  • 打赏
  • 举报
回复
报什么错误啊

87,901

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧