pandalovey 2010-02-11
代码如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="9-1.aspx.cs" Inherits="_9_1" %> <!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 runat="server"> <script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="extjs/ext-all.js"></script> <link rel="Stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" /> <title> 工具栏菜单demo</title> <script type="text/javascript"> Ext.onReady(function(){ var menu2=new Ext.menu.Menu({ items:[ {text:"今天"}, {text:"昨天"}, {text:"一周"}, {text:"一月"} ] }); var menu1 = new Ext.menu.Menu({ items:[ {text:"新建"}, {text:"打开"}, {text:"保存"}, {text:"另存"}, "-", {text:"历史",menu:menu2}, "-", {text:"关闭"} ] }); var tb = new Ext.Toolbar(); tb.render("hello"); tb.add({ text:"文件", menu:menu1 } ); tb.add({ text:"时间", menu:menu2}); }); </script> </head> <body> <form id="form1" runat="server"> <div id="hello"> </div> </form> </body> </html>
var text = "";if (!node) return "";if (!text = node.textContent;if (node.childNodes[0] && node.child