Dojo Tutorial Hello World Example
<script type="text/javascript" charset="utf-8" src="http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js"></script> |
Your first Dojo code
Let us now move on to our first Dojo code.
<html> <head> <script type="text/javascript" charset="utf-8" src="http://cdn.sencha.io/ext-4.1.0-gpl/ext-all.js"></script> <script type="text/javascript"> Ext.onReady(function() { var myDiv = Ext.get('myDiv'); Ext.create('Ext.Button', { text: 'Click me', renderTo: Ext.getBody(), handler: function() { myDiv.highlight(); } }); }); </script> </head> <body> <div id="myDiv">This is Reference Designer test div.</div> </body> </html> |
You may like to try this example here.
Explanation