Bug Tracker

Opened 10 years ago

Closed 10 years ago

#13354 closed bug (notabug)

a bug about ajax in local file-直接运行本地html文件时js中ajax的BUG

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:



var json = {};

function init() {


url : "../config/config.json", type : "GET", async : false, cache : false, dataType : "json", success : function(data) {

json = data; setting();




function setting() {

some codes that must use the Object "json"


以上代码如果放到服务器端运行没有问题,但是如果直接打开本地html文件,就根本不会执行"success: function() {}""里面的内容,导致setting中的内容无法正确执行


Change History (1)

comment:1 Changed 10 years ago by dmethvin

Resolution: notabug
Status: newclosed

Sorry but I cannot understand the bug report. Since you mentioned Chrome I suspect this is the limitation with local files on Chrome which is something we can't circumvent. You can use a command line switch to fix it though ... I don't have the switch handy.

Note: See TracTickets for help on using tickets.