JavaScript如何在webView跳转到指点的位置

 1 //当完成webView加载时调用
 2 - (void)webViewDidFinishLoad:(UIWebView *)webView{
 3     
 4     //如果有id
 5     if (self.help.Id) {
 6         //取得模型对应的id
 7         NSString *js = [NSString stringWithFormat:@"window.location.href ='#%@'",self.help.Id];
 8         [webView stringByEvaluatingJavaScriptFromString:js];
 9     }
10 }
原文地址:https://www.cnblogs.com/neilHoIOS/p/4665705.html