ExtJS不加载Ext-all.js

时间:2018-06-10 15:20:33

标签: extjs

为什么?一个非常简单的小ExtJS演示我试图在我的S3桶中工作,当页面加载时我得到了ext-all.js的403 Forbiden错误。

是什么给出的?你可以在这里测试一下:

https://s3.us-east-2.amazonaws.com/mazzoochi-extjs-bucket/index.html

谢谢,

(index.html的)

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Mazzochi First ExtJS App</title>
    <link rel="stylesheet" type="text/css" href="style.css">

   <link rel = "stylesheet" type = "text/css" href = "https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-crisp/resources/theme-crisp-all.css" / >
   <script type = "text/javascript" src = "https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"> </script>

    <script type="text/javascript">

        var myComp1 = Ext.create("Ext.container.Component",{

            html: 'component1'
        });

        var myComp2 = Ext.create("Ext.container.Component",{

            html: 'component2'
        });

        var myComp3 = Ext.create("Ext.container.Component",{

            html: 'component3'
        });

        var mycontainer = Ext.create("Ext.container.Container",{

            items:[myComp1,myComp2,myComp3],
            layout: 'vbox'
        });

        Ext.application({
            name: 'MyApp',
            launch: function () {
                Ext.create('Ext.container.Viewport', {
                    items: [

                            mycontainer 

                    ]
                });
            }
        });
    </script>
</head>
    <body>

        <div id="MyDivId"> 
        </div>
    </body>
</html>

1 个答案:

答案 0 :(得分:0)

因为网络浏览器无法加载资源。

enter image description here

使用命令

sencha app build

用于生产

请参阅:http://docs.sencha.com/extjs/6.5.3/guides/quick_start/going_to_production.html#quick_start-_-going_to_production_-_build_your_application