87,902
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>弹出菜单</title>
<style type="text/css">
<!--
ul a { text-decoration:none;}
li { list-style:none; margin-left:16px; display:none;}
-->
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
<!--
$(function(){
$('ul > a').click(function(){
$(this).nextAll('li').toggle();
});
$('li').click(function(){
alert('haha')
});
});
//-->
</script>
</head>
<body>
<ul>
<a href="#">我是菜单1</a>
<li>我是子菜单1</li>
<li>我是子菜单2</li>
</ul>
<ul>
<a href="#">我是菜单2</a>
<li>我是子菜单3</li>
<li>我是子菜单4</li>
</ul>
</body>
</html>
<div>
<asp:TreeView ID="t" runat="server">
<Nodes>
<asp:TreeNode Text="c#">
<asp:TreeNode Text="c#1"></asp:TreeNode>
<asp:TreeNode Text="c#2"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
<Nodes>
<asp:TreeNode Text="c++">
<asp:TreeNode Text="c++1"></asp:TreeNode>
<asp:TreeNode Text="c++2"></asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>
</div>