-6
(cdn_url = "", LazyLoad.js("maps/map0.js" {maps_loaded[0] = true}))

它一直说未捕获SyntaxError: Unexpected token {

现在说它不见了[

全线:

if (("" == window.location.port || "80" == window.location.port) && !/\/wiki/.test(window.location.pathname)) window.location = window.location.protocol + "//" + window.location.hostname + ":" + config.http_port + window.location.pathname;
var map = [],
    on_map = [],
    maps_loaded = {}, cdn_url = "localhost";
"80" != window.location.port ? (cdn_url = "", LazyLoad.js("maps/map0.js", {
    maps_loaded[0] = true
})) {
    maps_loaded[0] = true
})) : LazyLoad.js(cdn_url + "maps/map0.js?" + map_hashes[0], function () {
    maps_loaded[0] = true
});
4

2 回答 2

4

后面是否需要逗号:

"maps/map0.js"

之前:

{maps_loaded[0]=true}

?

于 2013-01-21T17:49:10.413 回答
2

形成我所看到的 - 在第一个参数传递给 LazyLoad.js 函数后你缺少昏迷 - >它应该是 (cdn_url="",LazyLoad.js("maps/map0.js", {maps_loaded[0]=true}) )

于 2013-01-21T17:49:38.603 回答