Created
January 18, 2014 09:05
-
-
Save beginor/8488015 to your computer and use it in GitHub Desktop.
test load extjs on demand
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Load ExtJS on demand</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" type="text/css" href="/ext-4/resources/css/ext-all.css" /> | |
<script type="text/javascript" src="/ext-4/ext-debug.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
Ext.onReady(function() { | |
Ext.Loader.setConfig({ | |
enabled : true, | |
disableCaching: false, | |
paths : { | |
Ext : '/ext-4/src' | |
} | |
}); | |
}); | |
</script> | |
<button onclick="createWindow()">Create Window</button> | |
<script type="text/javascript"> | |
function createWindow() { | |
var win = Ext.create('Ext.window.Window', { | |
title: 'My Window', | |
width: 300, | |
height: 200, | |
html: '<h1>Hello,world!</h1>' | |
}); | |
win.show(); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment