The stringByEvaluatingJavaScriptFromString always lost the first line, what’s wrong?
NSString* attribute_list2 = [wvPage stringByEvaluatingJavaScriptFromString:@"document.documentElement.innerHTML;"]

As above, the result lost the
<html>
line.
I am doing any thing wrong?
The
innerHTMLof the element only contains the HTML fragment that describe the descendants of the node, so it will not contain the the element itself.You may want to use
outerHTMLinstead, which is the HTML fragment that includes the element itself and its descendants.