var importData = function () { var id = $(this).attr("id"); $.ajaxFileUpload( { url: '../Services/Upload.ashx', secureuri: false, fileElementId: id, dataType: 'json', success: function (data, status) { if (typeof (data.error) != 'undefined') { if (data.error != '') { DisplayError(data.error); } else { QAjax('../services/applicationservice.asmx/ExstractData', { token: $.cookie('user_token'), path: data.name }, function (data1) { if (data1.ReturnCode == 1) { location.href = "/workspace/products.aspx"; //DisplayMessage('Import data successfully.'); } else { DisplayMessage('Failed to import data.'); } }); } } }, error: function (data, status, e) { if (e == "TypeError: xml is null") { alert(1); } else if (e == "SyntaxError: syntax error") { alert(2); } else if (e = "SyntaxError: Unexpected end of input") { alert(3); } //DisplayError(e); } } ); return false; }
运行这段代码的时候会出来这几种异常。找不到原因。请大神帮忙看看。
"这几种异常" 哪呢?
试试这个:www.twinkling.cn 绝对好用,好像音乐台前端也是用这个