Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/381.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 为什么在使用主干时不加载html?_Javascript_Jquery_Backbone.js_Marionette_Backbone Events - Fatal编程技术网

Javascript 为什么在使用主干时不加载html?

Javascript 为什么在使用主干时不加载html?,javascript,jquery,backbone.js,marionette,backbone-events,Javascript,Jquery,Backbone.js,Marionette,Backbone Events,我试图使用主干框架加载我的html页面。我正在使用主干木偶JS文件。我需要在主干中使用路由器功能时显示加载我的模板。你能告诉我哪里做错了吗?这是我的密码 啧啧 这里是网页中的静态内容。你会注意到它变得 一旦我们启动应用程序,它就会被替换 $(文档).ready(函数(){ var ContactManager=新的木偶.Application(); ContactManager.addRegions({ 主要地区:“竞争” }) ContactManager.on(“启动”,函数(){ lo

我试图使用主干框架加载我的html页面。我正在使用主干木偶JS文件。我需要在主干中使用路由器功能时显示加载我的模板。你能告诉我哪里做错了吗?这是我的密码


啧啧
这里是网页中的静态内容。你会注意到它变得
一旦我们启动应用程序,它就会被替换

$(文档).ready(函数(){ var ContactManager=新的木偶.Application(); ContactManager.addRegions({ 主要地区:“竞争” }) ContactManager.on(“启动”,函数(){ log(“ContactManager已启动!”); }); ContactManager.start(); })
您在哪里更改内容?实际上,我需要更改router.js文件上的内容。您似乎问了同样的问题。我回答。希望能帮助你。你能看看这个问题吗
<!DOCTYPE HTML>
<html>
<head>
    <title>Tut</title>
    <script type="text/javascript" src="lib/jquery-1.11.2.min.js"></script>
    <!--script type="text/javascript" src="lib/json2.js"></script-->
    <script type="text/javascript" src="lib/underscore.js"></script>
    <script type="text/javascript" src="lib/backbone.js"></script>
    <script type="text/javascript" src="lib/backbone.marionette.js"></script>
    <script type="text/javascript" src="router/router.js"></script>
    <script type="text/javascript" src="view/first.js"></script>
</head>
<body>

<div>
    <div id="header">

    </div>
    <div id="contend">
        <p>Here is static content in the web page. You'll notice that it gets
             replaced by our app as soon as we start it.</p>

    </div>
    <div id="fotter">

    </div>
</div>
<script type="text/javascript" src="view/first.js"></script>
</body>
<script>
    $(document).ready(function(){
        var ContactManager = new Marionette.Application();
        ContactManager.addRegions({
            mainRegion:"#contend"
        })

        ContactManager.on("start", function(){
            console.log("ContactManager has started!");


        });

        ContactManager.start();

    })


</script>
</html>