摘要: 加入Microsoft.JScript与Microsoft.Vsa两个命名空间。string Expression = "var result:int =0;result==1?\"成功\":\"失败\"";Microsoft.JScript.Vsa.VsaEngine ve = Microsoft.JScript.Vsa.VsaEngine.CreateEngine();Console.WriteLine(Microsoft.JScript.Eval.JScriptEvaluate(Expression, ve)); 阅读全文
posted @ 2010-12-17 11:40 虎头 阅读(2156) 评论(0) 推荐(0)
摘要: 1.引用Microsoft.mshtml添加net组件 Microsoft.mshtml2. 使用命名空间using mshtml;3.代码    string detailHtml=""; HTMLDocumentClass doc = new HTMLDocumentClass(); IHTMLDocument2 hc = doc; hc.write(detailHtml); hc.close(); doc = (HTMLDocumentClass)hc; detailHtml = doc.documentElement.innerHTML;//解析后的html hc.close(); d 阅读全文
posted @ 2010-12-17 10:44 虎头 阅读(1130) 评论(2) 推荐(0)