I have html code like this
<html>
<head>
</head>
<body>
<a href='001'><img src='chp1.png'/></a>
<a href='002'><img src='chp2.png'/></a>
</body></html>
I want to get 001 or 002 in by use stringbyevaluatingjavascriptfromstring
like
[self.webView stringByEvaluatingJavaScriptFromString:@""];
have anyone know how to get it
Thx
I don’t think
-stringByEvaluatingJavaScriptFromString:is a good choice here. Try using anNSScanner:Note that if you need to parse HTML you didn’t write yourself, you’ll need to add a lot more flexibility to this to account for possible stylistic differences (e.g.
'vs",hrefvsHREF).