Javascript Jquery$get,带ms-appdata://前缀

Javascript Jquery$get,带ms-appdata://前缀,javascript,jquery,ajax,get,win-universal-app,Javascript,Jquery,Ajax,Get,Win Universal App,我在我的Windows Universal(Windows 10)WebView中以Web托管应用程序的形式获得了带有jquery的html。我得到了这个问题: $.ajaxPrefilter(function (options) { if (options && options.url) { //this is where I can manupulate my url //after resolving the

我在我的Windows Universal(Windows 10)WebView中以Web托管应用程序的形式获得了带有jquery的html。我得到了这个问题:

$.ajaxPrefilter(function (options) {
        if (options && options.url) {
            //this is where I can manupulate my url
            //after resolving the requested data I can call options.success event with it
        }
    });
当我尝试加载本地资源时,例如:

"ms-appdata://local/test.js" 
从带有$get函数的javascript中,我在错误回调时收到网络错误。。。主要问题是我正在远程加载html(my location.href是我的服务器域)


如何使其工作?

我在JQuery库中看到了这个方法-ajaxPrefilter因此我将库添加到脚本中(我知道我说过没有库,但这个库确实帮了我的忙)

我就是这样克服这个问题的:

$.ajaxPrefilter(function (options) {
        if (options && options.url) {
            //this is where I can manupulate my url
            //after resolving the requested data I can call options.success event with it
        }
    });

尝试
window.location.href=“ms-appdata://local/test.js“
,在iPad webview中用于获取资源,不知道它是否适合您,或者尝试
getScript
是否可以提供您看到的错误?我把我的读心能力留在了办公室;-)我已经发布了答案。。。但是我没有得到任何错误,我只得到了失败承诺回调,这是$.get函数的结果