开发者

call javascript from cocoa

I have a cocoa application which contains a webview. Inside the webview is essentially a table of selectable information. I would like to access a user's selection inside thi开发者_如何学Pythons webview (html/js) from a button click (in the cocoa app). I assume that I could get this information by calling a javascript function inside of the web document, but I'm unsure about how to call this function from the cocoa app. Any suggestions?

Thanks!


[webView stringByEvaluatingJavaScriptFromString:your_javascript_here];  
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜