ios - How to access javascript function variable in UIWebview -


i want print variable value of javascript function in xcode console. script

<script language="javascript" type="text/javascript"> function myfunction() { var abc =@"my value";       alert('hello world'); } </script> 

with of

[webview stringbyevaluatingjavascriptfromstring:@"myfunction()"]];  

i able run function , alert of @"hello world" display.

my main concern nslog(@"abc value %@",?); how access abc value ="my value";

i new in javascript , don't have knowledge of basic of javascript.

waiting replay'

thanks

see url

iphone app , uiwebview javascript code can access variables?


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -