简体   繁体   中英

How can I get data from JavaScript in webview?

This is my JavaScript and HTML in iOS Project:

<input type="file" id="upload">

and I open the HTML in my webview

func webload() {
    let myPath = NSBundle.mainBundle().pathForResource("index", ofType: "html")

    webview.loadRequest(NSURLRequest(URL: NSURL(string: myPath!)!))
}

but how can I get the file on My iOS APP?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM