<small id='YwJfz'></small><noframes id='YwJfz'>

  • <tfoot id='YwJfz'></tfoot>
      <i id='YwJfz'><tr id='YwJfz'><dt id='YwJfz'><q id='YwJfz'><span id='YwJfz'><b id='YwJfz'><form id='YwJfz'><ins id='YwJfz'></ins><ul id='YwJfz'></ul><sub id='YwJfz'></sub></form><legend id='YwJfz'></legend><bdo id='YwJfz'><pre id='YwJfz'><center id='YwJfz'></center></pre></bdo></b><th id='YwJfz'></th></span></q></dt></tr></i><div id='YwJfz'><tfoot id='YwJfz'></tfoot><dl id='YwJfz'><fieldset id='YwJfz'></fieldset></dl></div>
      • <bdo id='YwJfz'></bdo><ul id='YwJfz'></ul>

      <legend id='YwJfz'><style id='YwJfz'><dir id='YwJfz'><q id='YwJfz'></q></dir></style></legend>

        iphone - 从 uiwebview 文本字段获取数据

        iphone - Getting data from uiwebview textfield(iphone - 从 uiwebview 文本字段获取数据)
        • <bdo id='5tOG3'></bdo><ul id='5tOG3'></ul>

          • <small id='5tOG3'></small><noframes id='5tOG3'>

            1. <tfoot id='5tOG3'></tfoot><legend id='5tOG3'><style id='5tOG3'><dir id='5tOG3'><q id='5tOG3'></q></dir></style></legend>
                  <tbody id='5tOG3'></tbody>
                <i id='5tOG3'><tr id='5tOG3'><dt id='5tOG3'><q id='5tOG3'><span id='5tOG3'><b id='5tOG3'><form id='5tOG3'><ins id='5tOG3'></ins><ul id='5tOG3'></ul><sub id='5tOG3'></sub></form><legend id='5tOG3'></legend><bdo id='5tOG3'><pre id='5tOG3'><center id='5tOG3'></center></pre></bdo></b><th id='5tOG3'></th></span></q></dt></tr></i><div id='5tOG3'><tfoot id='5tOG3'></tfoot><dl id='5tOG3'><fieldset id='5tOG3'></fieldset></dl></div>

                  本文介绍了iphone - 从 uiwebview 文本字段获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  正在开发一个将 HTML 页面加载到 uiwebview 中的应用程序 - 该 html 文件包含文本文件和下拉列表、文本框等.

                  Am developing an app which load a HTML page into uiwebview - that html file contains text-filed and drop-down list, text-boxes etc..

                  这里如何获取用户在该文本文件中输入的值以及从下拉(选择器)中选择的答案.

                  Here How to get values which user has entered in that text-filed and answers selected from drop-down(picker).

                  谢谢

                  推荐答案

                  你可以使用[UIWebView stringByEvaluatingJavascriptFromString:]方法,通过执行javascript获取值.

                  You can use [UIWebView stringByEvaluatingJavascriptFromString:] method and get the values by executing the javascript.

                  示例:如果你的 html 是:

                  Example: If your html is:

                  <html>
                    <body>
                        <input id="myId" type="text" value="TextValue"/>
                    </body>
                  </html>
                  

                  以下代码可以获取文本字段的值:

                  Following code can get you the value of the text field:

                     NSString* value = [webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('myId').value"];
                  

                  这篇关于iphone - 从 uiwebview 文本字段获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                  MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)
                  How to add and get the values from .plist in iOS(如何在 iOS 中从 .plist 添加和获取值)
                  Automatic iVars with @synthesize(使用 @synthesize 的自动 iVar)
                  How to automatically delete oldest core data entries when reach 50 entry limit?(达到 50 个条目限制时如何自动删除最旧的核心数据条目?)
                  Creating a gradient fill for text using [UIColor colorWithPatternImage:](使用 [UIColor colorWithPatternImage:] 为文本创建渐变填充)

                1. <small id='pYpnL'></small><noframes id='pYpnL'>

                          <bdo id='pYpnL'></bdo><ul id='pYpnL'></ul>
                            <tbody id='pYpnL'></tbody>
                          <tfoot id='pYpnL'></tfoot>
                          <legend id='pYpnL'><style id='pYpnL'><dir id='pYpnL'><q id='pYpnL'></q></dir></style></legend>
                          • <i id='pYpnL'><tr id='pYpnL'><dt id='pYpnL'><q id='pYpnL'><span id='pYpnL'><b id='pYpnL'><form id='pYpnL'><ins id='pYpnL'></ins><ul id='pYpnL'></ul><sub id='pYpnL'></sub></form><legend id='pYpnL'></legend><bdo id='pYpnL'><pre id='pYpnL'><center id='pYpnL'></center></pre></bdo></b><th id='pYpnL'></th></span></q></dt></tr></i><div id='pYpnL'><tfoot id='pYpnL'></tfoot><dl id='pYpnL'><fieldset id='pYpnL'></fieldset></dl></div>