<!DOCTYPE HTML>
<html manifest="">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>app</title>
<script type="text/javascript">
var Ext = Ext || {}; // Ext namespace won't be defined yet...
// This function is called by the Microloader after it has performed basic
// device detection. The results are provided in the "tags" object. You can
// use these tags here or even add custom tags. These can be used by platform
// filters in your manifest or by platformConfig expressions in your app.
//
Ext.beforeLoad = function (tags) {
var s = location.search, // the query string (ex "?foo=1&bar")
profile;
// For testing look for "?classic" or "?modern" in the URL to override
// device detection default.
if (s.match(/\bclassic\b/)) {
profile = 'classic';
}
else if (s.match(/\bmodern\b/)) {
profile = 'modern';
}
else {
profile = tags.desktop ? 'classic' : 'modern';
//profile = tags.phone ? 'modern' : 'classic';
}
Ext.manifest = profile; // this name must match a build profile name
// This function is called once the manifest is available but before
// any data is pulled from it.
//
//return function (manifest) {
// peek at / modify the manifest object
//};
};
</script>
<!--The line below must be kept intact for Sencha Cmd to build your application -->
<script id="microloader" data-app="e34bf098-cabc-49d5-a390-bd9e72585c15" type="text/javascript" src="bootstrap.js"></script>
<script type="text/javascript">
function helloworld(){
Ext.Msg.alert("EXTJS");
}
</script>
</head>
<body onload="helloworld()">
</body>
</html>
为什么 Ext.Msg.alert("EXTJS"); 不能执行?需要导入
<script src="ext/ext-bootstrap.js" ></script>
才能执行!
这个代码是Sencha Cmd6生成的ExtJs6.0 的index.html 为什么我加入的ext代码就不行 他可以调用其他ext代码展现首页
http://my.oschina.net/ihanfeng/blog/277687
自己看ext-bootstrap.js源代码就知道了,这个文件会导入ext-all.js或者ext-all-debug.js这个文件。你导入bootstrap.js又没有加载ext框架,肯定报错了
这个代码是Sencha Cmd6生成的ExtJs6.0 的index.html 为什么我加入的ext代码就不行 他可以调用其他ext代码展现首页