htmlファイルがwebviewにロードされ、そのhtmlには次のようなdivが含まれます。
<div id="test">hello</div>
およびiOSコードは次のとおりです。しかし、私は常に空の値を受け取ります。私が欠けているものは何ですか?ありがとうございました
-(void)webViewDidFinishLoad:(UIWebView *)webView {
NSString *body = [self.webView stringByEvaluatingJavaScriptFromString:
@"document.getElementById('test').value"];
NSLog(@"received data: %@", body);
}