<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" src="js/MzTreeView10.js"></script>
<link href="css/Global.css" type="text/css" rel="stylesheet">
<title>JSP Page</title>
<style>
A.MzTreeview
{
font-size: 9pt;
padding-left: 3px;
}
</style>
</head>
<body>
<script type="text/javascript" language="javascript" >
var window.tree = new MzTreeView("tree");
tree.icons["property"] = "image/property.gif";
tree.icons["css"] = "image/collection.gif";
tree.icons["book"] = "image/book.gif";
tree.iconsExpand["book"] = "image/bookopen.gif";
tree.nodes["0_1"] = "text:鞋部件;data:id=1";
tree.nodes["0_2"] = "text:纹理;data:id=2";
tree.nodes["1_59"] = "text:鞋大底;data:id=59";
tree.nodes["1_60"] = "text:鞋中底;data:id=60";
tree.nodes["1_61"] = "text:鞋帮面;data:id=61";
tree.nodes["1_62"] = "text:鞋帮里;data:id=62";
tree.nodes["2_63"] = "text:纺织品;data:id=63";
tree.nodes["2_64"] = "text:皮革;data:id=64";
tree.nodes["63_65"] = "text:长毛绒;data:id=65";
tree.nodes["63_66"] = "text:短毛绒;data:id=66";
tree.nodes["65_67"] = "text:长毛绒A;data:id=67";
tree.nodes["65_68"] = "text:长毛绒B;data:id=68";
tree.nodes["64_69"] = "text:羊皮;data:id=69";
tree.setURL("categoryMain.jsp");
tree.setTarget("categoryMain");
document.write(tree.toString());</script> </body>
</html>梅花雪树形,显示不出来,调试也没发现错误,help!help!help!
解决方案 »
- missing ; before statement这个是什么问题?
- 小小问题如何解决?
- 如何获得extjs的点开的标签个数?
- 帮忙看看"缺少对象"的问题.
- 圆砣学JS,,,谢谢大家呀...
- 在线等!如何判断一个文本框是否获得焦点!
- 主窗口控制弹出的子窗口的问题, 多个子窗口!
- 给我介绍一个学习JavaScript的好书吧
- 如何才能实现多维数组?能否用Array直接实现呢?谢谢!
- 如何在前端判断两个日期的大小?
- 如何控制上传图片的大小
- chrome中,设置table的某行行高,如:document.getElementbyId("tr3").style.height="50px",为什么无效?
去掉 var
像这样 运行就ok
<!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>
<script language="JavaScript"
src="http://www.meizz.com/Web/Plugs/MzTreeView10.js"></script>
<base href="http://www.meizz.com/Web/">
<style>
A.MzTreeview
{
font-size: 9pt;
padding-left: 3px;
}
</style>
<script language="JavaScript">
var tree = new MzTreeView("tree"); tree.icons["property"] = "property.gif";
tree.icons["css"] = "collection.gif";
tree.icons["book"] = "book.gif";
tree.iconsExpand["book"] = "bookopen.gif"; //展开时对应的图片 tree.setIconPath("http://www.meizz.com/Icons/TreeView/"); //可用相对路径 tree.nodes["0_1"] = "text:WEB 编程";
tree.nodes["1_100"] = "text:代码示例; data:id=100";
tree.nodes["1_200"] = "text:梅花雪脚本控件集; data:id=200";
tree.nodes["1_310"] = "text:CSS; icon:css; data:id=310";
tree.nodes["1_320"] = "text:DHTML; data:id=320";
tree.nodes["1_300"] = "text:HTML; data:id=300";
tree.nodes["1_400"] = "text:JavaScript; icon:book; data:id=400";
tree.nodes["320_322"] = "text:属性; icon: property; data:id=322";
tree.nodes["320_323"] = "text:方法; data:id=323";
tree.nodes["320_324"] = "text:事件; icon:event; data:id=324";
tree.nodes["320_325"] = "text:集合; data:id=325";
tree.nodes["400_407"] = "text:对象; data:id=407";
tree.nodes["400_406"] = "text:方法; data:id=406";
tree.nodes["400_408"] = "text:运算符; data:id=408";
tree.nodes["400_409"] = "text:属性; data:id=409";
tree.nodes["407_1140"] = "text:Date; url:Article.asp; data:id=140";
tree.nodes["406_1127"] = "text:toString; url:Article.asp; data:id=127";
tree.nodes["408_1239"] = "text:||; url:Article.asp; data:id=239";
tree.nodes["409_1163"] = "text:E; url:Article.asp; data:id=163"; tree.setURL("Catalog.asp");
tree.setTarget("MzMain");
document.write(tree.toString()); //亦可用 obj.innerHTML = tree.toString();
</script></body>
</html>
但是把这句 <script language="JavaScript"
src="http://www.meizz.com/Web/Plugs/MzTreeView10.js"></script>
js的目录换成本地的:
<script language="JavaScript"
src="MzTreeView10.js"></script>
就不行,html文件和js文件在同一个目录下