开发者

call javascript from cocoa

开发者 https://www.devze.com 2023-01-28 16:18 出处:网络
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 webv

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

精彩评论

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

关注公众号