Created
June 29, 2013 03:11
-
-
Save pphetra/5889543 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>Template</title> | |
| <link rel="stylesheet" href="extjs/resources/css/ext-all.css"> | |
| <script src="extjs/ext-all-debug.js"></script> | |
| <script> | |
| // รอให้ page load เสร้จแล้วค่อยทำงาน | |
| Ext.onReady(function() { | |
| Ext.create('Ext.panel.Panel', { | |
| height: 200, | |
| renderTo: document.body, | |
| layout: { | |
| type: 'table', | |
| columns: 3 | |
| }, | |
| defaults: { | |
| width: 40, | |
| xtype: 'button' | |
| }, | |
| listeners: { | |
| click: function(btn, e) { | |
| var key = btn.getText(); | |
| alert('clicked ' + key); | |
| } | |
| }, | |
| items: [ | |
| { | |
| xtype: 'textfield', | |
| colspan: 3, | |
| width: 120 | |
| }, | |
| { | |
| text: '7', | |
| bubbleEvents: ['click'] | |
| }, | |
| { | |
| text: '8' | |
| }, | |
| { | |
| text: '9' | |
| },, | |
| { | |
| text: '4' | |
| }, | |
| { | |
| text: '5' | |
| }, | |
| { | |
| text: '6' | |
| }, | |
| { | |
| text: '1' | |
| }, | |
| { | |
| text: '2' | |
| }, | |
| { | |
| text: '3' | |
| }, | |
| { | |
| text: '0' | |
| }, | |
| { | |
| text: 'clr' | |
| } | |
| ] | |
| }) | |
| }); | |
| </script> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment