logeed1 2015-11-24 13:18 采纳率: 25%
浏览 3834

Extjs6 bootstrap.js为什么不能加载extjs框架

<!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代码展现首页

  • 写回答

3条回答

  • devmiao 2015-11-24 15:55
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 怎么获取下面的: glove_word2id.json和 glove_numpy.npy 这两个文件
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug