jeudi 8 octobre 2015

stringByEvaluatingJavaScriptFromString if statement?

In Xcode, I'm trying to get my UIWebview to run this:

 function setSizeValue() {
   for (var i=0; i
     if(document.getElementsByName("skuAndSize")[0].options[i].text == 8) {
       document.getElementsByName("skuAndSize")[0].selectedIndex = i;
       }
    }

How would I put this code in a NSString properly so the function could work and could be called under

[myWebView stringByEvaluatingJavaScriptFromString:codeAbove];

Aucun commentaire:

Enregistrer un commentaire