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"];

相关文章: