(5)ExtJS之工具栏toolbar 1
来源:互联网 发布:统计怎么下载数据 编辑:程序博客网 时间:2024/05/18 18:43
006_toolbar.js:
Ext.onReady(function(){var toolbar=new Ext.toolbar.Toolbar({//创建工具栏renderTo:Ext.getBody(),width:300});toolbar.add([//向工具栏中添加按钮{text:'新建',//按钮上显示的文字handler:onButtonClick,//点击按钮的处理函数iconCls:'newIcon'//在按钮上显示的图标},{text:'打开',handler:onButtonClick,iconCls:'openIcon'},{text:'保存',handler:onButtonClick,iconCls:'saveIcon'}]);function onButtonClick(btn){//点击按钮时调用的处理函数alert(btn.text);//取得按钮上的文字}});
JSP页面:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP 'JS1.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><!-- extjs的样式文件 --><link rel="stylesheet" type="text/css" href="js/extjs/resources/css/ext-all.css"><!-- extjs的核心文件 --><script type="text/javascript" charset="utf-8" src="js/extjs/ext-all-debug.js"></script><!-- 国际化文件 --><script type="text/javascript" charset="utf-8" src="js/extjs/ext-lang-zh_CN.js"></script><script type="text/javascript" charset="utf-8" src="base/006_toolbar.js"></script></head> <body><%-- <input type="button" id="btn" value="点击" /> --%></body></html>
0 0
- (5)ExtJS之工具栏toolbar 1
- (6)ExtJS之工具栏toolbar 2
- ExtJs 入门教程十六[工具栏 :Toolbar]
- extjs中Toolbar工具栏的用法
- Extjs之Extjs工具栏和菜单栏
- Ext.toolbar.Toolbar工具栏
- Ext.toolbar.Toolbar 工具栏
- Ext.toolbar.Toolbar工具栏
- WPF 4 Ribbon 开发 之 标签工具栏(Tab Toolbar)
- Windows 工具栏ToolBar
- Toolbar工具栏.doc
- 工具栏(toolbar)
- extjs4 toolbar工具栏
- toolBar-->添加工具栏
- 工具栏ToolBar的使用
- 使用Toolbar工具栏
- How to set Extjs Toolbar items' width to expand the whole 工具栏项的宽度设为百分比
- Extjs中的工具栏介绍
- ecliper for javaee +tomcat 环境搭建与 helloworld实现
- http://blog.johnbunting.me/
- Sublime Text2 编译 lua 环境
- Json依赖包
- 美国人眼中的腾讯
- (5)ExtJS之工具栏toolbar 1
- 寻找发帖“水王”
- 修复树莓派
- 开发者所需要知道的iOS7 SDK新特性
- Unity导出android关于路径问题总结
- 消息机制--时钟显示
- Binary search Tree 总结
- 快速设计对话框
- UIWebView访问网页适应手机屏幕的方法