左侧的导航栏是jquery +ajax 读取XML 动态生成的,现在就差 点击节点 在右侧显示内容了
部分代码:
function parseXML() {
debugger
var title = $(this).attr("Title");
var link = $(this).attr("Link");
var descCount = $(this).attr("DescendantCount"); //
if (parseInt(descCount) > 0) {
temp += '<li class="sidebarLi"><a href="/">' + title + '</a>';
//$('<li class="sidebarLi"><a href="/">' + title + '</a></li>').appendTo('.sidebar ul');
temp += "<ul>";
$(this).children("TocEntry").each(parseXML);
temp += "</ul>";
} else {
temp += '<li class="sidebarLi"><a href="/">' + title + '</a>';
//$('<li class="sidebarLi"><a href="/">' + title + '</a></li>').appendTo('.sidebar ul');
}
temp += "</li>";
}XML <?xml version="1.0" encoding="utf-8"?>
<CatapultToc Version="1" DescendantCount="21">
<TocEntry Title="Role-based administration overview" Link="/Content/Windows/rba_c_overview.htm" ComputedResetPageLayout="true" ComputedFirstTopic="true" DescendantCount="0" />
<TocEntry Title="Role-based administration workflow" Link="/Content/Windows/rba_t_workflow.htm" ComputedFirstTopic="false" DescendantCount="0" />
<TocEntry Title="Users" Link="" ComputedFirstTopic="false" DescendantCount="4">
<TocEntry Title="Adding Management Suite console users" Link="/Content/Windows/rba_c_adding-users.htm" ComputedFirstTopic="false" DescendantCount="0" />
<TocEntry Title="Add Management Suite console users" Link="/Content/Windows/rba_t_add_users.htm" ComputedFirstTopic="false" DescendantCount="0" />
<TocEntry Title="Delete users" Link="/Content/Windows/rba_t_delete-users.htm" ComputedFirstTopic="false" DescendantCount="0" />
<TocEntry Title="Viewing user or group properties" Link="/Content/Windows/rba_h_view-properties.htm" ComputedFirstTopic="false" DescendantCount="0" />
</TocEntry>
</TocEntry>有个属性是 Link 是 保存每个HTML的路径现在我要实现点击节点 然后找到这个HTML 显示到右侧 这个怎么弄啊???大环境是 ASP.NET MVC 3.0 大牛们帮帮忙,我抗不住了。
部分代码:
function parseXML() {
debugger
var title = $(this).attr("Title");
var link = $(this).attr("Link");
var descCount = $(this).attr("DescendantCount"); //
if (parseInt(descCount) > 0) {
temp += '<li class="sidebarLi"><a href="/">' + title + '</a>';
//$('<li class="sidebarLi"><a href="/">' + title + '</a></li>').appendTo('.sidebar ul');
temp += "<ul>";
$(this).children("TocEntry").each(parseXML);
temp += "</ul>";
} else {
temp += '<li class="sidebarLi"><a href="/">' + title + '</a>';
//$('<li class="sidebarLi"><a href="/">' + title + '</a></li>').appendTo('.sidebar ul');
}
temp += "</li>";
}XML <?xml version="1.0" encoding="utf-8"?>
<CatapultToc Version="1" DescendantCount="21">
<TocEntry Title="Role-based administration overview" Link="/Content/Windows/rba_c_overview.htm" ComputedResetPageLayout="true" ComputedFirstTopic="true" DescendantCount="0" />
<TocEntry Title="Role-based administration workflow" Link="/Content/Windows/rba_t_workflow.htm" ComputedFirstTopic="false" DescendantCount="0" />
<TocEntry Title="Users" Link="" ComputedFirstTopic="false" DescendantCount="4">
<TocEntry Title="Adding Management Suite console users" Link="/Content/Windows/rba_c_adding-users.htm" ComputedFirstTopic="false" DescendantCount="0" />
<TocEntry Title="Add Management Suite console users" Link="/Content/Windows/rba_t_add_users.htm" ComputedFirstTopic="false" DescendantCount="0" />
<TocEntry Title="Delete users" Link="/Content/Windows/rba_t_delete-users.htm" ComputedFirstTopic="false" DescendantCount="0" />
<TocEntry Title="Viewing user or group properties" Link="/Content/Windows/rba_h_view-properties.htm" ComputedFirstTopic="false" DescendantCount="0" />
</TocEntry>
</TocEntry>有个属性是 Link 是 保存每个HTML的路径现在我要实现点击节点 然后找到这个HTML 显示到右侧 这个怎么弄啊???大环境是 ASP.NET MVC 3.0 大牛们帮帮忙,我抗不住了。
解决方案 »
- Winform应用程序打包的时候怎么实现序列号
- Microsoft VBScript 运行时错误 '800a01fa' 救命啊!!!
- 编译选项里的Release和Debug有什么区别?默认生成的都是Debug
- mysql数据库,编码问题
- 怎么在提交表单的时候,把提交的内容加密?
- 大家看看,IIS的缓存,你们是怎么弄得哦,,
- 怎么在新页中提示?比喻说我在一个页面中点击"AddNew",在另一个空白页面中提示:"Company Code cannot be blank!"
- webservice 连接不上数据库
- 为什么安装了水晶报表9.2版本后显示的控件总是说创建控件时出错呢?
- 运行实例出错,请大家帮我看看是什么原因?
- .net发邮件问题:雅虎邮箱附件为何不显示?
- 新人求助!关于gridview的数据源
。<head runat="server">
<title>无标题页</title>
<frameset cols="165,*,8" frameborder="no" border="0" framespacing="0">
<frame name="left" target="left" src="left.aspx" frameborder="no" scrolling="No" noresize="noresize" border="0" framespacing="0" >
<frame name="main" src="index.aspx" target="main">
<frame name="right" target="right" src="right.aspx" frameborder="no" scrolling="No" noresize="noresize" border="0" framespacing="0" >
<noframes>
</noframes>
</frameset>
</head>
导航的时候加入target="main"
如
<a href="xxxx.aspx" target="main">TEST</a>
("divid")[0].src='http://wwww.baidu.com/'