Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/vim/5.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
Backbone.js 我已经创建了一个按钮。我想通过在主干中单击它来重定向到另一个页面。我该怎么做?_Backbone.js - Fatal编程技术网

Backbone.js 我已经创建了一个按钮。我想通过在主干中单击它来重定向到另一个页面。我该怎么做?

Backbone.js 我已经创建了一个按钮。我想通过在主干中单击它来重定向到另一个页面。我该怎么做?,backbone.js,Backbone.js,我已经创建了一个按钮。我想通过在主干中单击它来重定向到另一个页面。我该怎么做? 我尝试了以下代码,但不起作用: router.navigate("/file:///code/order/table.html",true); 使用JavaScript: window.location.href=file:///code/order/table.html'; 但我建议使用相对路径和简单锚定标记: 这里的主干路由器使用错误。从router.navigatefragment,[options]这是函数

我已经创建了一个按钮。我想通过在主干中单击它来重定向到另一个页面。我该怎么做? 我尝试了以下代码,但不起作用:

router.navigate("/file:///code/order/table.html",true);
使用JavaScript:

window.location.href=file:///code/order/table.html';

但我建议使用相对路径和简单锚定标记:


这里的主干路由器使用错误。从router.navigatefragment,[options]这是函数用法,第一个参数应该是fragment,它通过router.routes注册

如果您想导航到另一个文件,您可以考虑窗口.List.HeRF