<small id='yJq8b'></small><noframes id='yJq8b'>

    • <bdo id='yJq8b'></bdo><ul id='yJq8b'></ul>

      <i id='yJq8b'><tr id='yJq8b'><dt id='yJq8b'><q id='yJq8b'><span id='yJq8b'><b id='yJq8b'><form id='yJq8b'><ins id='yJq8b'></ins><ul id='yJq8b'></ul><sub id='yJq8b'></sub></form><legend id='yJq8b'></legend><bdo id='yJq8b'><pre id='yJq8b'><center id='yJq8b'></center></pre></bdo></b><th id='yJq8b'></th></span></q></dt></tr></i><div id='yJq8b'><tfoot id='yJq8b'></tfoot><dl id='yJq8b'><fieldset id='yJq8b'></fieldset></dl></div>
      <tfoot id='yJq8b'></tfoot>

    1. <legend id='yJq8b'><style id='yJq8b'><dir id='yJq8b'><q id='yJq8b'></q></dir></style></legend>
    2. 从 UIWebView 检测 window.open()

      Detect window.open() from UIWebView(从 UIWebView 检测 window.open())
      <i id='PaArx'><tr id='PaArx'><dt id='PaArx'><q id='PaArx'><span id='PaArx'><b id='PaArx'><form id='PaArx'><ins id='PaArx'></ins><ul id='PaArx'></ul><sub id='PaArx'></sub></form><legend id='PaArx'></legend><bdo id='PaArx'><pre id='PaArx'><center id='PaArx'></center></pre></bdo></b><th id='PaArx'></th></span></q></dt></tr></i><div id='PaArx'><tfoot id='PaArx'></tfoot><dl id='PaArx'><fieldset id='PaArx'></fieldset></dl></div>
        <tbody id='PaArx'></tbody>
      <tfoot id='PaArx'></tfoot>

            <bdo id='PaArx'></bdo><ul id='PaArx'></ul>
              1. <legend id='PaArx'><style id='PaArx'><dir id='PaArx'><q id='PaArx'></q></dir></style></legend>
              2. <small id='PaArx'></small><noframes id='PaArx'>

                本文介绍了从 UIWebView 检测 window.open()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                小问题:是否可以使用 UIWebViewDelegateUIWebView 中检测 window.open() 还是有其他方法可以达到这?当触发 window.open()-Event 以显示 UIAlertView 时,我需要 url.

                Short question: Is it possible to detect window.open() in a UIWebView using the UIWebViewDelegate or is there another way to reach this? I need the the url when a window.open()-Event is fired to show a UIAlertView.

                推荐答案

                你需要用 JavaScript 覆盖 window.open():

                You need to overwrite window.open() using JavaScript:

                [webView stringByEvaluatingJavaScriptFromString:@"window.open = function (open) { return function  (url, name, features) { window.location.href = url; return window; }; } (window.open);"];
                

                这篇关于从 UIWebView 检测 window.open()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                iOS UIWebView app opens link in Safari(iOS UIWebView 应用在 Safari 中打开链接)
                Close UIWebView using javascript:window.close();(使用 javascript:window.close() 关闭 UIWebView;)
                NSCachedURLResponse returns object, but UIWebView does not interprets content(NSCachedURLResponse 返回对象,但 UIWebView 不解释内容)
                Trouble hiding iAd banner and displaying UIWebView in its place(无法隐藏 iAd 横幅并在其位置显示 UIWebView)
                Knowing when AJAX has loaded in UIWebView(知道何时在 UIWebView 中加载了 AJAX)
                Load image/logo in existing HTML input field - UIWebView(在现有的 HTML 输入字段中加载图像/徽标 - UIWebView)
                <i id='45dXH'><tr id='45dXH'><dt id='45dXH'><q id='45dXH'><span id='45dXH'><b id='45dXH'><form id='45dXH'><ins id='45dXH'></ins><ul id='45dXH'></ul><sub id='45dXH'></sub></form><legend id='45dXH'></legend><bdo id='45dXH'><pre id='45dXH'><center id='45dXH'></center></pre></bdo></b><th id='45dXH'></th></span></q></dt></tr></i><div id='45dXH'><tfoot id='45dXH'></tfoot><dl id='45dXH'><fieldset id='45dXH'></fieldset></dl></div>
              3. <tfoot id='45dXH'></tfoot>

                        <tbody id='45dXH'></tbody>
                    1. <legend id='45dXH'><style id='45dXH'><dir id='45dXH'><q id='45dXH'></q></dir></style></legend>

                      <small id='45dXH'></small><noframes id='45dXH'>

                      • <bdo id='45dXH'></bdo><ul id='45dXH'></ul>