- (void)webView:(WKWebView*)webViewdecidePolicyForNavigationAction:(WKNavigationAction*)navigationActiondecisionHandler:(void(^)(WKNavigationActionPolicy))decisionHandler {
// 允许链接跳转
decisionHandler(WKNavigationActionPolicyAllow);
// 获取新页面的URL
NSString*url = navigationAction.request.URL.absoluteString;
NSLog(@"dd%@",url);
}
网友评论