HTML里面有JS 我要解析使用了自定义方法,解析得很好,但仅限JS包含在网页里而已,现在问到了问题如何解决单独JS文件的HTML呢我的代码如果
该如何改写 public virtual string GetScriptAnalysisHtml(string html)
{
string result = string.Empty;
try
{ HTMLDocumentClass doc = new HTMLDocumentClass();
IHTMLDocument2 hc = doc;
hc.write(html);
hc.close();
doc = (HTMLDocumentClass)hc;
result = doc.documentElement.innerHTML;
hc.close();
doc.close();
}
catch (Exception exp)
{
} return result;
}
该如何改写 public virtual string GetScriptAnalysisHtml(string html)
{
string result = string.Empty;
try
{ HTMLDocumentClass doc = new HTMLDocumentClass();
IHTMLDocument2 hc = doc;
hc.write(html);
hc.close();
doc = (HTMLDocumentClass)hc;
result = doc.documentElement.innerHTML;
hc.close();
doc.close();
}
catch (Exception exp)
{
} return result;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货