devedbox / AXWebViewController

AXWebViewController is a webViewController to browse web content inside applications. It’s a lightweight controller on iOS platform based on WKWebView (UIWebView would be the base Kit under iOS 8.0). It added navigation tool bar to refresh, go back, go forward and so on. It support the navigation style on WeChat. It is a simple-using and convenient web view controller using inside applications.
MIT License
798 stars 134 forks source link

点击_blank链接不跳转 #94

Open KangYJie opened 5 years ago

KangYJie commented 5 years ago

链接http://guan.ule.com/guan/jiangsu/tag/gonghuie.html simulator screen shot - iphone x - 2018-12-06 at 16 12 06

替换,才可以加载

// if (!navigationAction.targetFrame.isMainFrame) { // [webView evaluateJavaScript:@"var a = document.getElementsByTagName('a');for(var i=0;i<a.length;i++){a[i].setAttribute('target','');}" completionHandler:nil]; // } //如果是跳转一个新页面 if (navigationAction.targetFrame == nil) { [webView loadRequest:navigationAction.request]; }