Remove hyperlinks in uiwebview

2019-06-13 22:11发布

I am trying to load a html page through UIWebview.I need to disable all the hyperlinks in webview and make its color to normal text color i.e i need to disable webpage detection.Is that possible

Thanks in advance

1条回答
老娘就宠你
2楼-- · 2019-06-13 22:24

Use this UIWebView method

– stringByEvaluatingJavaScriptFromString:

To use Javascript.

Then use "document.getElementsByTagName('a')" to get an Array of elements and do want you want (change the href, change the color etc.)

查看更多
登录 后发表回答