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 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用