I have a web view in my view controller. In my web view there is a html form is load. Now when user input the value of form and press a button which is into view controller. After pressing the button I need those input value. How can I retrieve this value?
I try this way. but How can I get data?
override func viewDidLoad() {
super.viewDidLoad()
somec.loadRequest(URLRequest(url: URL(string: "https://tympanus.net/Tutorials/LoginRegistrationForm/")!))
}
@IBAction func getData(_ sender: Any) {
let inputValue = somec.stringByEvaluatingJavaScript(from: "document.body.innerHTML")
print(inputValue!)
}