how to call parameterized javascript function in the WebKit?

南笙酒味 提交于 2019-12-05 21:51:30

What you have looks fine. Here is a sample project that demonstrates an almost identical syntax.

Try changing webView.loadUrl("javascript:changeLocation( -0.1279688 ,51.5077286 );") ;

to webView.loadUrl("javascript:changeLocation( '-0.1279688' ,'51.5077286' );") ; and maybe getting rid of the ;

I just had a similar problem and I fixed it by adding the '' around my parameter. I didn't have a semicolon in my solution either and it worked so you may need to remove it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!