- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
backbone.js 网站上没有 Backbone.history.loadURL 的文档 http://backbonejs.org/#History-start虽然我对它在我看过的某些应用程序中产生的结果有一个大致的了解,但我不确定它是如何工作的,从它选择加载哪个 url 以及它如何知道加载某个 url 到另一个 url 的意义上.谁能解释一下?
$.ajax({
url: "json/Backboneapp_data.json",
dataType: 'json',
data: {},
async: false,
success: function (data)
{
_this._data = data;
_this._items = new ItemCollection(data);
_this._view = new MenuView({ model: _this._items });
_this._view.render();
Backbone.history.loadUrl();
}
});
最佳答案
来自 Annotated Source 的关于 loadUrl
的注释:
Attempt to load the current URL fragment. If a route succeeds with a match, returns true. If no defined routes matches the fragment, returns false.
因此,如果当前 URL 片段(或您作为参数传递的片段)有效,则它会调用 route
。另请注意,如果该函数根据片段解析了有效路由,则该函数返回 true,否则返回 false。
如果它有助于澄清:向下查看源代码,您会注意到如果指定选项 trigger:true,
。loadUrl
就是 navigate
调用的内容
关于javascript - backbone.history.loadURL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12992301/
我的 WebView 适用于 Google.com 等网站,但不会加载特定页面。 简单地显示subscribe to feedburner(我制作这个网站是为了反射(reflect)一个转换后的新闻提
我的 webview 收费从服务器查看页面 private String url = "http://192.168.33.37/gestpresenze/index.html"; @Override
我已经使用 addJavascriptInterface() 方法向 WebView 添加了一个 Javascript 接口(interface)对象,我正在尝试使用 WebView.loadUrl(
我有一个测试页面,可以为测试的每个问题从 HTML 加载数据。每当我从 HTML 中获取视频作为 iFrame 时,我都会将其解析为数据 URI,然后在 WebView 中显示该视频。我使用同一页面来
我写了一个方法来从用户那里获取地址信息,然后将其显示在谷歌的 map 上。这是我写的方法 function doRemoteMapEmployee(e) { var mapEmployeeAddres
刚刚开始使用 Electron,我希望能够使用 loadURL 加载页面,但不替换整个页面。 这里的想法是如何使用像部分/模板这样的东西,这样我就可以在顶部和底部拥有一致的布局,但将不断变化的内容引入
(首先,我要声明一下,我的专业领域是 HTML5(和 php/coldfusion),而我是 Java/Android 的初学者) 在我的 onCreateOptionsMenu 中,我有以下代码来处
我有一个从 android webview 播放音乐的应用程序,我已经自动播放到下一首歌曲,为了播放下一首歌曲,我需要在 webview 中加载新的 url。一切正常。但是当我从 webview 添加
我的 Android 应用程序有一个更新类,在同一个应用程序中,我有另一个通过 webview 打开网站的类。问题是我想让更新类加载 url 但不显示它,然后缓存它(如果可能的话,所以如果用户离线它应
我想创建一个可以在应用程序中打开网站的应用程序。所以我想使用webview。但是,当我使用“loadurl”功能时,该应用程序在手机(Android 4.2.2)上崩溃了。你知道问题出在哪里吗? 错误
我试图在 webview 中打开 url,但它在外部浏览器中打开 url。 我的代码是 public class MainActivity extends Activity { private
我知道要在 webview 中运行 javascript 函数,我们需要在 loadUrl() 中加载它。在我的程序中,当我在 loadUrl 中使用它时,一切正常 javascript 被调用,但
我有三个 fragment 。我已经从第三个 fragment 向第一个 fragment 发送了一个字符串(URL)。第一个 fragment 有一个 webView 。我想在我从第三个 fragm
我的 WebView 是这样设置的 public class Webview extends Activity { private WebView webView; @Override protect
我正在尝试加载页面,然后执行 JavaScript 代码,如下所示: webview.setWebViewClient(new WebViewClient() { @Over
当我点击 webview 页面中的按钮时出现错误。据说,当我单击按钮时,它将更改为 google 站点。以下是代码和错误:- 主 Activity .java package com.mt.nad.t
是否可以将值传递给 webView.loadUrl 中提到的 URL?像这样的?? webView.loadUrl("file:///android_asset/www/index.html#valu
当尝试在我的 Android Things webview 中加载 url 时,页面最初加载,然后使 UI 崩溃并显示一条指向 IoT FrameworkPackageStubs 的错误消息。 我在
这是我的代码: package sai.datla.game; import android.app.Activity; import android.os.Bundle; import androi
backbone.js 网站上没有 Backbone.history.loadURL 的文档 http://backbonejs.org/#History-start虽然我对它在我看过的某些应用程序中
我是一名优秀的程序员,十分优秀!