English 中文(简体)
向 js 发送目标- c 对象吗?
原标题:Sending objective-c object to js?

I m actually doing an UIWebview with html and js in it. A friend doing same with Android

我的问题是,在机器人上,有办法 将一个Android物体 发送到喷射针上,并轻松使用它

但是在iOS里有办法做同样的事情吗?

I tried to use windowScriptObject but its not available on iphone. I also tried to send all the datas one per one with

stringByEvaluatingJavaScriptFromString

但有点丑陋:

还有其他解决办法吗?

谢谢 谢谢

最佳回答

在iOS上,唯一的方法是使用字符串ByEvaluatinfJavaScript from String。

但是为什么你一个一个地调用数据呢?把它们包装到你自己的数据结构中,或者使用杰森是将数据传送到Javascript的简单而自然的方法。

问题回答

rel="nofol=使用WKit < 在这里。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签