首页 新闻 赞助 找找看

不使用框架如何实现网页分块显示?

0
悬赏园豆:10 [已解决问题] 解决于 2010-11-22 18:44

 一个网页分为上下两大块,上层为导航之类的,下层为内容层,内容层又分为左右层,现在我的左右是用控件实现的菜单,如何点左边的内容,右边会显示相应的内容。我现在是用框架实现的,现在想用ajax实现。如何做呢?求DEMO?急!

QQ:274730510

问题补充: 左边是用DataList实现的,左边如何写? <asp:DataList ID="DataList1" runat="server" DataKeyField="ProductClass_ParentID" onitemdatabound="DataList1_ItemDataBound" RepeatColumns="1" RepeatDirection="Horizontal"> <ItemTemplate> <dl class="ProductParent"> <dt><img src="images/i1.gif" id="img_i1" /><a href="ProductShow.aspx?parentid=<%#Eval("ProductClass_ParentID") %>" ><%#Eval("ProductClass_ParentName")%></a></dt> <dt class="ProductDirectory"><asp:DataList ID="DataList2" runat="server" DataKeyField="ProductClass_ID" RepeatColumns="4" RepeatDirection="Horizontal"> <ItemTemplate> <dl> <dt><a href='ProductShow.aspx?classid=<%#Eval("ProductClass_ID") %>'> <%#Eval("ProductClass_Name")%></a></dt> </dl> <ItemTemplate> </ItemTemplate> </ItemTemplate> </asp:DataList> </dt> <dt><a href='ProductShow.aspx?parentid=<%#Eval("ProductClass_ID") %>'><img src="images/more.gif" class="img_more1" /></dt> </dl> </ItemTemplate> </asp:DataList>
hardy_Wang的主页 hardy_Wang | 初学一级 | 园豆:17
提问于:2010-11-22 14:14
< >
分享
最佳答案
0

Demo:

<!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>
<title></title>
<script language="javascript" type="text/javascript">
function ajaxtest(obj) {
document.getElementById(
"test").innerHTML = obj.toString();//修改这里,用AJAX取值
}
</script>
</head>
<body>
<div style="height: 300px">
<div style="width:200px; float:left;height:250px; border:solid 1px #333333;">
<a href="javascript:ajaxtest('博客园')">博客园</a><br />
<a href="javascript:ajaxtest('Google')">Google</a><br />
<a href="javascript:ajaxtest('百度')">百度</a><br />
</div>
<div style="width:400px; float:left;height:250px; margin-left:10px; border:solid 1px #333333;">
<span id="test"></span>
</div>
</div>
</body>
</html>
收获园豆:10
artwl | 专家六级 |园豆:16736 | 2010-11-22 14:28
左边是用datalist实现的!
hardy_Wang | 园豆:17 (初学一级) | 2010-11-22 14:43
呼呼。。。好像知道了
hardy_Wang | 园豆:17 (初学一级) | 2010-11-22 14:46
楼主知道了就该结贴给分了,回复人也不容易。
顾晓北 | 园豆:10844 (专家六级) | 2010-11-22 16:44
嘿嘿!来晚了
hardy_Wang | 园豆:17 (初学一级) | 2010-11-22 18:44
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册