首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

UIWebView点击,获取点击联接

2012-06-29 
UIWebView点击,获取点击连接[code"c"]- (BOOL)webView:(UIWebView*)webView shouldStartLoadWi

UIWebView点击,获取点击连接

[code="c"]- (BOOL)webView:(UIWebView*)webView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType {
//enum {
//? UIWebViewNavigationTypeLinkClicked,
//?? UIWebViewNavigationTypeFormSubmitted,
//?? UIWebViewNavigationTypeBackForward,
//?? UIWebViewNavigationTypeReload,
//?? UIWebViewNavigationTypeFormResubmitted,
//?? UIWebViewNavigationTypeOther
//};
//typedef NSUInteger UIWebViewNavigationType;

//判断是否是单击
if (navigationType == UIWebViewNavigationTypeLinkClicked) {
NSURL *url = [request URL];
??????? nsstring *curUrl= [url absoluteString];
NSLog(@"cururl...............%@",curUrl);

}
return YES;??
}?
禁止长按UIWebview中的连接弹出菜单

function stopCall() {
? ? document.documentElement.style.webkitTouchCallout = "none";
}

?

热点排行