Iframe 如何在phonegap视图中打开链接?

Iframe 如何在phonegap视图中打开链接?,iframe,cordova,kendo-ui,Iframe,Cordova,Kendo Ui,我想在视图中打开一个链接,比如。我用iframe src=”“尝试过,但当我在iphone上运行它时,它会在webview中打开,所以我无法看到页眉和页脚 <div data-role="view" data-layout="overview-layout" data-title="More"> <div data-role="content" > <div class="km-scroll-container" >

我想在视图中打开一个链接,比如。我用iframe src=”“尝试过,但当我在iphone上运行它时,它会在webview中打开,所以我无法看到页眉和页脚

 <div data-role="view" data-layout="overview-layout" data-title="More">    
    <div data-role="content" >
        <div class="km-scroll-container" > 
            <ul id="menuList" class="item-list km-listview km-listgroup">
                <li>
                    <ul data-role="listview">
                        <li><a class="details-link" data-role="listview-link" href="">xxx</a></li>
                          <li><a class="details-link" data-role="listview-link" href="#moreinfo">yyy</a></li>

                        <li></li>

                    </ul>
                </li>
            </ul>
        </div>
    </div>        
</div>

    <div data-role="view" data-layout="overview-layout" id="moreinfo" data-title="More Info">   
    <div data-role="content">
        <div class="km-scroll-container">
           <iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0"
                marginwidth="0" src="http://www.google.com">
            </iframe>    
        </div>
    </div>


当我打开此页面时,它会在网络视图中直接打开google,我的意图是在单击“yyy”时打开。我还需要它在iphone上运行。

下载url的内容,然后在视图中单击“加载”按钮

    NSData *d = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://www.google.com"]];
    NSString *s = [[NSString alloc] initWithData:d encoding:NSUTF8StringEncoding];
    //load string s in view
    textView.text = s;

如果可以使用javascript,请尝试使用

window.open("www.google.com");
在您的html中:

<iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0"
                marginwidth="0" onclick="window.open("www.google.com")">


我不是iphone开发人员,需要它在html页面中工作,并使用kendoui.onclick属性not finding。在这里,如果我使用onclick作为锚,它会很好地打开链接,但它会在新的web视图中打开,而不是在我的页面中打开,该页面用页脚和页眉装饰。[Follo Link][1][1]: