ios webview如何监控webview加载新的url

时间:2022-09-04 08:14:56

**Situation is like this,my webview load a base request url,when user clicked the html or anyother action,the webview will laod a new url. Can I get the webview changed events? If window.location.href can be worked well,and how?

**情况是这样的,我的webview加载了一个基本请求URL,当用户点击html或任何其他动作时,webview将提交一个新的url。我可以获取webview更改的事件吗?如果window.location.href可以很好地工作,怎么样?

1 个解决方案

#1


0  

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

this method will be performed every time you click the button of html

每次单击html按钮时都会执行此方法

#1


0  

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

this method will be performed every time you click the button of html

每次单击html按钮时都会执行此方法