取得网页的源码内容的函数以及调用方法供大家参考: program geturl; uses wininet, windows; //取网页内容 function StrPas(const Str: PChar): string; begin Result := Str; end; function GetWebPage(const Url: string):string; var Session, HttpFile:HINTERNET; szSizeBuffer:Pointer; dwLengt
//获取网页源代码 var s: string; begin s := WebBrowser1.OleObject.document.body.innerHTML; //body内的所有代码 s := WebBrowser1.OleObject.document.body.outerHTML; //body内的所有代码, 包含body标签 s := WebBrowser1.OleObject.document.documentElement.innerHTML; //html内的
******************************* * 编 译 错 误 信 息 * ******************************* ';' not allowed before 'ELSE' ElSE前不允许有“;” '<clause>' clause not allowed in OLE automation section 在OLE自动区段不允许“<clause>”子句 '<name>' is not a type identifier
******************************* * 编 译 错 误 信 息 * ******************************* ';' not allowed before 'ELSE' ElSE前不允许有“;” '' clause not allowed in OLE automation section 在OLE自动区段不允许“”子句 '' is not a type identifier 不是类型标识符 '' not previously declared