iphone – Getting data from uiwebview textfield
You can use [UIWebView stringByEvaluatingJavascriptFromString:] method and get the values by executing the javascript.
Example:
If your html is:
Following code can get you the value of the text field:
NSString* value = [webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('myId').value"];
UIWebView获取数据

本文介绍如何使用UIWebView的stringByEvaluatingJavaScriptFromString方法通过执行JavaScript来获取HTML中特定元素的值,例如文本框的值。
2811

被折叠的 条评论
为什么被折叠?



