There are three ways to use button with event. Following are three samples.
/**
* The first way to use button with event: default event is "onclick".
*
*
*/
<script type="text/javascript">
Ext.onReady(function(){
new Ext.Button([
renderTo: Ext.getBody(),
text: "Confirm",
handler: function(){
alert("Welcome to ExtJS world!");
}
]);
});
</script>
/**
* The second way to use button with event.
*/
<script type="text/javascript">
Ext.onReady(function(){
new Ext.Button([
renderTo: Ext.getBody(),
text: "Confirm",
listeners: {
"click": function(){
alert("Welcome to ExtJS world!");
}
}
]);
});
</script>
/**
* The third way to use button with event.
*/
<script type="text/javascript">
Ext.onReady(function(){
var _button = new Ext.Button([
renderTo: Ext.getBody(),
text: "Confirm"
]);
_button.on("click", function(){
alert("Welcome to ExtJS world!");
});
});
</script>
分享到:
相关推荐
演讲出彩的三种方式three ways to deliver Effective Presentations
How to use SFTP (with client validation - public key authentication) The topic How to use SFTP (with client validation - password authentication) discusses the simplest form of client ...
Starting with how to build 3D games on the web using the Three.js graphics library, you will learn how to build 3D worlds with meshes, lighting, user interaction, physics, and more. Along the way, you...
Studies indicate that if three or more systems with a degree of common functionality are to be developed, a product-line approach is significantly more cost-effective. <br>To model and design ...
Use event-driven architecture and messaging with RabbitMQ Create RESTful services with Spring Master service discovery with Eureka and load balancing with Ribbon Route requests with Zuul as your API ...
With Three.js, it is possible to create stunning 3D graphics in an intuitive manner using JavaScript, without having to learn WebGL. With this book, you’ll learn how to create and animate beautiful ...
Studies indicate that if three or more systems with a degree of common functionality are to be developed, a product-line approach is significantly more cost-effective. <br>To model and design ...
用法安装: npm install -- save three - to - cannon 进口: // ES6import { threeToCannon } from 'three-to-cannon' ;// CommonJSthreeToCannon = require ( 'three-to-cannon' ) . threeToCannon ; 用: // ...
to implement a variety of interesting techniques and special effects, such as working with animated character meshes, picking, environment mapping, normal mapping, real-time shadows, and ambient ...
This book presents an introduction to programming interactive computer graphics, with an emphasis on game development, using Direct3D 10. It teaches the fundamentals of Direct3D and shader programming...
With H2O software, you can perform machine learning and data analysis using a simple open source framework that’s easy to use, has a wide range of OS and language support, and scales for big data....
Author Chris Griffith takes you step-by-step through Ionic’s powerful collection of UI components, and then helps you use it to build three cross-platform mobile apps. Whether you’re new to this ...
Three.js is a JavaScript 3D library that offers a wide range of features for creating and displaying stunning 3D computer graphics on a web browser in an intuitive manner using JavaScript without ...
This might not be your particular target language or platform, but you can use you can use what you learn here to engineer or re-evaluate your own code translation system to dramatically increase the...
Game.Development.with.Three.js Game.Development.with.Three.js Game.Development.with.Three.js
Game Development with Three.js.pdf
The Art of Debugging ... The book also explains how to use features like catchpoints, convenience variables, and artificial arrays and become familiar with ways to avoid common debugging pitfalls.
PNG图片的三态按钮,VS2005,VS2008下测试通过,小巧实用
Beginning with some basic recipes to get you started, this book will guide you through the most important features that Three.js has to offer. You'll even learn how to quickly create new geometries ...