Skip to main content

change content of HTML (JavaScript)loaded in uiwebview in objective-c

Just use this code to change the content coming from Web url or Html data.(Used Javascript replace query with ios) and load it by change content of html.


 [_webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('images').innerHTML = '图片'"];

Comments

Popular posts from this blog

post method using alamofire in swift 3

  func addSubscriptionApi(_completeUrl: String ) {         //HUD         Alamofire.request(_completeUrl, method:.post, parameters: nil , encoding: JSONEncoding. default , headers: nil ).responseJSON { response in             switch (response.result) {             case .success( _ ):                 if let data = response.result.value as ? NSDictionary                 {                     print(response.result.value as Any)                     print(data)                      print("SUCCESS")                  }                 break  ...

Create ActionSheet and AlertView in swift 3

let  alertVC:  UIAlertController  = UIAlertController (title:  "Alert" , message:  "YOUR MESSAGE" , preferredStyle: .actiobSheet)    let  okBtn = UIAlertAction. init (title:  "Ok" , style: . default , handler: {  _   in                           // Perform whatever you want                          })     alertVC.addAction(okBtn)     self .present(alertVC, animated:  true , completion:  nil )