在 jQuery 文件本身中:
this.item_test = function(){
$('body').css('background-color', '#00ff00');
window.location = "/allCorrect/yes";
}
Out come 1(第 1 行证明 jQuery 工作正常):UIWebView
绿色的背景(预期和正确)。
Out come 2(对于第 2 行,window.location 行):在委托方法中,预期(UIWebView *)webView shouldStartLoadWithRequest:
值为。request.mainDocumentURL.relativePath
/allCorrect/yes
我的问题:我没有得到“/allCorrect/yes”,而是得到了调用 jQuery 文件本身的以下文件位置:
“/Users/chiemekailo/Library/Application Support/iPhone Simulator/5.0/Applications/77BB3C4A-E99C-47C3-B2AE-F4DSDMFE84MFOEF/Documents/Unzipped/OPS”