请教delphi mshtml 问题

xue5521 2008-12-27 09:40:12
<iframe class="WBTB_Composition" id="WBTB_Composition" marginheight="5" marginwidth="5" width="100%" height="100%" onblur="WBTB_CopyData('Body');"></iframe>
<textarea class='WBTB_Compostion' id='WBTB_HtmlArea' name='WBTB_HtmlArea' style='clear:both;display:none;width:100%;height:100%;word-break:break-all;' ></textarea>


iframe 如何用delphi webbrowser 往textarea 里写数据用MSHTML
...全文
209 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
nkym0626 2009-03-04
  • 打赏
  • 举报
回复
procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);

var
Frame, Bod, Doc: Variant;
begin
Frame:=IWebBrowser(pDisp).Document;
Bod:=Frame.Body;
memo1.Text:= memo1.Text + #13#10 + '<!-- NEW FRAME --!>'+ #13#10 + Bod.InnerHTML;
memo1.Update;
Doc:=WebBrowser1.Document;
if CompareText(String(doc.ReadyState),'complete')=0
then begin
if ( pos('res://', Doc.URL)=1 )
then ShowMessage('Error:'+#10+Doc.Title)
else ShowMessage('Document complete');
end;
end;
lcgboy 2009-02-25
  • 打赏
  • 举报
回复
结贴吧
lcgboy 2009-02-25
  • 打赏
  • 举报
回复


procedure SetTextAreaValue(str: string);
var
doc:IHTMLDocument2;
area:IHTMLTextAreaElement;
begin
doc:=webbrowser1.document as IHTMLDocument2;
area:=doc.all.item('WBTB_HtmlArea',0) as IHTMLTextAreaElement;
area.value:='asdfasdfasdf';
end;
xue5521 2008-12-28
  • 打赏
  • 举报
回复
自己顶
kampan 2008-12-27
  • 打赏
  • 举报
回复
不知道啊,帮顶!

5,392

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧