javascript - Script in iPhone SDK -
Can anyone help me, how to write a script in the iPhone SDK without the HTML string?
I'm trying this:
[webView stringByEvaluatingJavaScriptFromString: @ "var script = document.createElement ('script');" "Script. Type = 'text / javascript';" "Script.text = alert ();" "Document.getElementsByTagName ('body'). Attachment (script);"];
But I can not see the warning on this.
Can anyone help me in this?
[webview stringvvvtv javascriptframestring: @ "var script = document. CreateElement ('script');" "Script. Type = 'text / javascript';" "Script.text = \" function myFunction () {"" warning (); ""} \ ";" "Document.getElementsByTagName ('body') appendChild (script);"]; [WebView stringbivyewelting JavaScript ScriptWriterString: @ "MyFunction ();"];
Try it out ....
Comments
Post a Comment