首页 新闻 会员 周边 捐助

TreeView 图片无法显示,js也报错误

0
悬赏园豆:100 [已关闭问题]
<table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td><a id="TreeView1n0" href="javascript:TreeView_ToggleNode(TreeView1_Data,0,TreeView1n0,'-',TreeView1n0Nodes)"><img style="border-width: 0px;" src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySDUMdCNDLQhnPpY4eKVgpNplR6PC4CUZ_gk_SkvLLqIT0&amp;t=633968276888906250" alt="折叠 首页" /></a></td> <td style="white-space: nowrap;"><a id="TreeView1t0" class="TreeView1_0" title="网站首页" href="http://space.cnblogs.com/WebApplication/Default.aspx">首页</a></td> </tr> </tbody> </table> <div id="TreeView1n0Nodes" style="display: block;"> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td><a id="TreeView1n1" href="javascript:TreeView_ToggleNode(TreeView1_Data,1,TreeView1n1,'t',TreeView1n1Nodes)"><img style="border-width: 0px;" src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySEu1EpYe1GYyfRQCpwNOonknE1eOHOfJyJDkGgX00-2e0&amp;t=633968276888906250" alt="折叠 导航控件" /></a></td> <td style="white-space: nowrap;"><a id="TreeView1t1" class="TreeView1_0" title="控件" href="http://space.cnblogs.com/WebApplication/controls/Default.aspx">导航控件</a></td> </tr> </tbody> </table> <div id="TreeView1n1Nodes" style="display: block;"> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td> <div style="width: 20px; height: 1px;"><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySHgr7gqM1j_hmCmTZ2QT1dk1&amp;t=633968276888906250" alt="" /></div> </td> <td><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySGzdelCapkiJSHGen4h83Bk1&amp;t=633968276888906250" alt="" /></td> <td style="white-space: nowrap;"><a id="TreeView1t2" class="TreeView1_0" title="SiteMapPath控件" href="http://space.cnblogs.com/WebApplication/SiteMapPath.aspx">SiteMapPath控件</a></td> </tr> </tbody> </table> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td> <div style="width: 20px; height: 1px;"><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySHgr7gqM1j_hmCmTZ2QT1dk1&amp;t=633968276888906250" alt="" /></div> </td> <td><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySAJuSjoL_vNkAqDUoKQR1hU1&amp;t=633968276888906250" alt="" /></td> <td style="white-space: nowrap;"><a id="TreeView1t3" class="TreeView1_0" title="Menu控件" href="http://space.cnblogs.com/WebApplication/controls/Menu.aspx">Menu控件</a></td> </tr> </tbody> </table> </div> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td><a id="TreeView1n4" href="javascript:TreeView_ToggleNode(TreeView1_Data,4,TreeView1n4,'t',TreeView1n4Nodes)"><img style="border-width: 0px;" src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySEu1EpYe1GYyfRQCpwNOonknE1eOHOfJyJDkGgX00-2e0&amp;t=633968276888906250" alt="折叠 标准控件" /></a></td> <td style="white-space: nowrap;"><span id="TreeView1t4" class="TreeView1_0" title="标准控件">标准控件</span></td> </tr> </tbody> </table> <div id="TreeView1n4Nodes" style="display: block;"> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td> <div style="width: 20px; height: 1px;"><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySHgr7gqM1j_hmCmTZ2QT1dk1&amp;t=633968276888906250" alt="" /></div> </td> <td><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySGzdelCapkiJSHGen4h83Bk1&amp;t=633968276888906250" alt="" /></td> <td style="white-space: nowrap;"><a id="TreeView1t5" class="TreeView1_0" title="TextBox控件" href="http://space.cnblogs.com/WebApplication/controls/TextBox.aspx">TextBox控件</a></td> </tr> </tbody> </table> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td> <div style="width: 20px; height: 1px;"><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySHgr7gqM1j_hmCmTZ2QT1dk1&amp;t=633968276888906250" alt="" /></div> </td> <td><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySGzdelCapkiJSHGen4h83Bk1&amp;t=633968276888906250" alt="" /></td> <td style="white-space: nowrap;"><a id="TreeView1t6" class="TreeView1_0" title="Button控件" href="http://space.cnblogs.com/WebApplication/controls/Button.aspx">Button控件</a></td> </tr> </tbody> </table> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td> <div style="width: 20px; height: 1px;"><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySHgr7gqM1j_hmCmTZ2QT1dk1&amp;t=633968276888906250" alt="" /></div> </td> <td><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySAJuSjoL_vNkAqDUoKQR1hU1&amp;t=633968276888906250" alt="" /></td> <td style="white-space: nowrap;"><a id="TreeView1t7" class="TreeView1_0" title="Label控件" href="http://space.cnblogs.com/WebApplication/controls/Label.aspx">Label控件</a></td> </tr> </tbody> </table> </div> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td><a id="TreeView1n8" href="javascript:TreeView_ToggleNode(TreeView1_Data,8,TreeView1n8,'l',TreeView1n8Nodes)"><img style="border-width: 0px;" src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySMBm1OhPeX3Fn7Qm_tZTMA9sx6fVQjlzuZj_M5jWjTCv0&amp;t=633968276888906250" alt="折叠 url映射" /></a></td> <td style="white-space: nowrap;"><a id="TreeView1t8" class="TreeView1_0" title="url映射" href="http://space.cnblogs.com/WebApplication/UrlMappings.aspx">url映射</a></td> </tr> </tbody> </table> <div id="TreeView1n8Nodes" style="display: block;"> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySGzdelCapkiJSHGen4h83Bk1&amp;t=633968276888906250" alt="" /></td> <td style="white-space: nowrap;"><a id="TreeView1t9" class="TreeView1_0" title="accp首页" href="http://space.cnblogs.com/WebApplication/index.aspx">北大青鸟首页</a></td> </tr> </tbody> </table> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySGzdelCapkiJSHGen4h83Bk1&amp;t=633968276888906250" alt="" /></td> <td style="white-space: nowrap;"><a id="TreeView1t10" class="TreeView1_0" title="teacher" href="http://space.cnblogs.com/WebApplication/teacher.aspx">教员</a></td> </tr> </tbody> </table> <table style="border-width: 0px;" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><img src="http://space.cnblogs.com/WebApplication/WebResource.axd?d=M_Ppmw3YjMlhw-FmquRySAJuSjoL_vNkAqDUoKQR1hU1&amp;t=633968276888906250" alt="" /></td> </tr> </tbody> </table> </div> </div>
汉城的主页 汉城 | 初学一级 | 园豆:2
提问于:2010-01-02 16:30
< >
分享
其他回答(2)
0

没代码,难说啊

woody.wu | 园豆:3621 (老鸟四级) | 2010-01-03 21:01
0

如果图片是通过js添加,很有可能就是哪里的错误了, 你可以先把所有的语句全部注释,然后逐句打开调试,这样是调试js的最有效方法了, 因为没有代码,完全是猜测!

EyasL | 园豆:208 (菜鸟二级) | 2010-01-04 14:04
0

添加一个ImageList,并把treeview的ImageList属性设置为刚添加的ImageList,在程序中设置:

 Node.ImageIndex = 1;

Node.SelectedImageIndex = 1;

Node为我们要设置的节点,1是添加的imagelist的图片索引。

ImageIndex是设置默认的图片,SelectedImageIndex是设置节点被选中时的图片。

kyle_zhao | 园豆:435 (菜鸟二级) | 2010-01-06 13:12
参考这篇文章: http://www.51obj.cn/?p=744
支持(0) 反对(0) walkingp | 园豆:301 (菜鸟二级) | 2010-03-14 22:19
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册