我可以使用 Javascript(或任何 Web 技术)将 UIWebView 中的变量传递回我的应用程序吗? [英] Can I pass a variable from a UIWebView back to my app using Javascript (or any web technology)?

查看:15
本文介绍了我可以使用 Javascript(或任何 Web 技术)将 UIWebView 中的变量传递回我的应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 UIWebView,上面有一个表单.我想从发送回我的应用程序的表单中获取响应,以便它可以做出相应的响应.有没有办法用 javascript 或任何东西来做这件事?

I have a UIWebView with a form on it. I would like to get the response from the form sent back to my application so that it can respond accordingly. Is there anyway to do this with javascript or anything?

推荐答案

类似:

NSString *formValue1 = [webview stringByEvaluatingJavaScriptFromString:@"document.forms[0].elements[0]"];

这篇关于我可以使用 Javascript(或任何 Web 技术)将 UIWebView 中的变量传递回我的应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆