开发者

Append html to webview content

开发者 https://www.devze.com 2023-04-04 05:00 出处:网络
currently loading a URL like Google.com into my web view like so [webView setMainFrameURL:@\"http://google开发者_如何学编程.com\"];

currently loading a URL like Google.com into my web view like so

[webView setMainFrameURL:@"http://google开发者_如何学编程.com"];

How can I append html to that like "<h1>End of page</h1>"? Thanks


You would need to manipulate the DOM (Document Object Model) after the page has loaded in the WebView. You can use the WebFrameLoadDelegate methods to determine when the page has loaded successfully.

To manipulate the DOM, you can use Objective-C via the various DOM manipulation classes or you can use JavaScript.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号