更改uiwebview div对象的内容

ysn*_*nky 4 iphone uiwebview

有没有办法在iphone应用程序中更改uiwebview的内容?通过使用div或其他.

我的问题是,随时将数据附加到uiwebview.它认为可以通过替换div内容来完成?

Sat*_*tya 7

你可以这样改变

[webview stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.getElementById('divtagId').innerHTML ='%@';",newContent]];
Run Code Online (Sandbox Code Playgroud)