在WebView中单击链接时加载本地HTML文件 [英] load local HTML file when link is clicked in WebView
本文介绍了在WebView中单击链接时加载本地HTML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个WebView加载这样的本地HTML文件:
I have a WebView that loads a local HTML file like this:
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"test1" ofType:@"html"]isDirectory:NO]]];
我想要的是单击test1本地HTML文件中的链接,然后为webView加载
What I want is to click a link in the test1 local HTML file and then for the webView to load the test2 local HTML file.
推荐答案
p>喜欢在一个普通的网页。让测试1中的链接指向test2。
Like in a regular webpage. Let the link in test 1 point to test2.
这篇关于在WebView中单击链接时加载本地HTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文