zoukankan      html  css  js  c++  java
  • UIWebView捕获内部web点击事件

    在此有一个webView默认是打开 百度的页面;设置代理,并在代理中处理

    - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType

     1 - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
     2 {
     3     //在此捕获当前打开的URL的地址;
     4     NSLog(@"%@",request.URL.absoluteString);
     5     //此内测试在此用webView打开百度页面;点击---新闻---点击新闻分类,当点击新闻为   国际  时,模拟为注册成功,关闭注册页面;就是关闭当前webView页面
     6     //internews
     7     if ([request.URL.absoluteString hasSuffix:@"internews"]) {
     8         NSLog(@"line<%d> %s",__LINE__,__func__);
     9         [self closeView];
    10         return NO;
    11     }
    12     
    13     return YES;
    14 }
  • 相关阅读:
    ant中build.xml文件解释
    mysql练习题
    Mysql基本知识
    Python Socket 简单聊天室2
    Python Socket 简单聊天室1
    Python 导入模块
    Python 文件的处理
    Python yield
    Python 内置函数
    Python 生成验证码
  • 原文地址:https://www.cnblogs.com/cocoajin/p/3480599.html
Copyright © 2011-2022 走看看