使用 sendJavascript() Phonegap [英] Using the sendJavascript() Phonegap

查看:21
本文介绍了使用 sendJavascript() Phonegap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题非常笼统,似乎无关紧要.我自己知道不应该在这里问这种类型的问题.但是经过长时间的研究,发到很多Phonegap高手的博客上,没有得到他们的回复,我现在来到了StackOverflow.如此之多,以至于在 Internet 上的任何地方都没有关于这种特定方法的文档,也没有在 PhoneGap 文档,也不在 norlaypf3A&51"2old.vrd.51"20rl .

我的问题很简单.我想知道,如何在 DroidGap 类 插件类 中使用sendJavascript()>在 Javascript 中调用函数.

我找到了本教程,但它已经过时了并且不适用于 Phonegap 3.0.如果有人建议对教程进行一些修改或一些新方法,那就太好了.

我不需要代码,只要告诉我怎么做.我只需要一个骨架

我贴了一个类似的问题,其实是原版问题,我正在寻找解决方案.

请就此给我建议.我会很高兴的.

<小时>

编辑 1:在搜索到 Google 的最深处时,我发现了这种令人毛骨悚然的方法的第一个文档.这里是链接

解决方案

sendJavascript 函数定义在 CordovaWebView.

每个 Cordova 插件都有一个 webView 属性,可以让您轻松访问调用 javascript 函数.

I know the question is highly general, and seem to be irrelevant. I myself know that this type of questions should not be asked here. But after researching for long, posting to the blogs of many Phonegap masters, I got no replies from them, I have now came to StackOverflow. So much so, that there are no documentation for this particular method anywhere on the Internet, neither in PhoneGap Docs, nor in Cordova Docs.

My question is very simple. I want to know, how to use the sendJavascript() in the DroidGap class or the Plugin class to call a function in Javascript.

I found this tutorial, but it is very obsolete and doesn't work with Phonegap 3.0. It would be very nice if someone suggest some modification in the tutorial, or some new approach.

I don't need the code, just tell me how to do it. I just need a skeleton

I posted a similar question, actually it is the original problem, to which I am looking the solution for.

Please suggest me something on this. I'll be very glad.


Edit 1: On searching to the deepest of Google, I found this first documentation of this creepy method. Here is the link

解决方案

The sendJavascript function is defined in CordovaWebView.

Each Cordova plugin has a webView property that should give you easy access to call the javascript function.

这篇关于使用 sendJavascript() Phonegap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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