核心提示://读取网页脚本中的变量:procedure TForm1.Button1Click(Sender: TObject);vars: string;i: Integer;begins := WebBro...
//读取网页脚本中的变量: procedure TForm1.Button1Click(Sender: TObject); var s: string; i: Integer; begin s := WebBrowser1.OleObject.document.Script.str; i := WebBrowser1.OleObject.document.Script.num; ShowMessage(s); //Hello ShowMessage(IntToStr(i)); //99 //也可以这样读: s := WebBrowser1.OleObject.document.parentWindow.str; i := WebBrowser1.OleObject.document.parentWindow.num; ShowMessage(s); //Hello ShowMessage(IntToStr(i)); //99 end;