OZの部屋

なんでも日記です

TwebBrowserメモ

2006-11-12 11:43:12 | プログラム
空のドキュメントを開く
WebBrowser1.Navigate('about:blank');

TWebBrowser の Document を使う
参考:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects.asp

最初に
  wbdoc:OLEVariant;
  wbdoc:=WebBrowser1.OleObject.Document;
  または
  wbdoc:=WebBrowser1.Document as IHTMLDocument2;

全体のHTMLソースを取得
  wbdoc.documentElement.innerHTML;//ReadOnly
全体のHTMLタグを抜いたテキストのみを取得
  wbdoc.documentElement.innerText;//ReadOnly

  body.innerHTML  <body>abc</body> ならば abc
  body.outerHTML  <body>abc</body> タグ自身を含む

WebBrowserにHTMLソースを流し込む
  wbdoc.Write('<html><head></head><body>abc</body></html>');

HEAD部のHTMLを取得
  wbdoc.all.tags('Head').item(0).innerHtml
  タグ名はcaseignore

BodyにHTMLソースを書き込む
  wbdoc.body.innerHTML:='<font color="#ff0055">abcxyz</font>';

デザインモードにする・解除する
  wbdoc.designMode:='on';// 'off'    または Inherit の値あり

選択範囲のHTMLを取得・設定
  wbdoc.selection.createRange.htmlText
選択範囲のテキストを取得・設定
  wbdoc.selection.createRange.Text

表示倍率設定
  wbdoc.body.Style.Zoom:=0.5;  // 1.0=100%


最新の画像もっと見る

2 コメント

コメント日が  古い順  |   新しい順
hervelegerdress@outlook.com (herve leger bandage dress)
2020-02-24 23:27:29
https://my.desktopnexus.com/legerdresses/journal/herve-leger-things-24742/
https://justpaste.it/349yj
https://justpaste.it/2cl85
https://is.gd/XnDbAX
https://is.gd/RSmpf8
https://is.gd/xRu7bd
https://amba.to/3aRK5xr
https://amba.to/2RBnr4L
https://justpaste.it/4fmkv
http://bit.ly/2GzPSts
http://legerdresses.livedoor.blog/archives/5502734.html
http://bit.ly/2S3igcK
https://tinyurl.com/tn36t5f
https://tinyurl.com/s398dhw
https://tinyurl.com/rsxuhjl
https://tinyurl.com/w56duae
http://site-2235565-7576-4011.mystrikingly.com/blog/herve-leger-story
http://site-2235565-7576-4011.mystrikingly.com/blog/herve-leger-history
https://tinyurl.com/yx8enwze
http://tiny.cc/zrxbjz
http://tiny.cc/c738jz
http://tiny.cc/8rxbjz
http://tiny.cc/qsxbjz
http://site-2235565-7576-4011.mystrikingly.com/blog/herve-leger-things
https://is.gd/GoCwmt
https://is.gd/YAB5R8
https://is.gd/ZXhxGb
https://is.gd/VAwDRO
http://bit.ly/2t3wP7I
http://bit.do/fvjE3
http://bit.ly/3aR6VoW
https://tinyurl.com/vfstgh6
https://tinyurl.com/wnbxhsv
http://tiny.cc/ftxbjz
http://tiny.cc/ztxbjz
http://tiny.cc/avxbjz
http://tiny.cc/cxxbjz
Orologi lusso (Orologi lusso)
2021-11-29 15:48:52
https://dailygram.com/index.php/blog/1013077/il-rolex-submariner/
https://is.gd/4PYBGs
https://is.gd/7H5mDX
https://is.gd/oMm0L0
https://is.gd/QtB7sQ
https://is.gd/ERLshJ
https://dailygram.com/index.php/blog/1013084/qual-e-il-rolex-meno-costoso/
https://bit.ly/3wQOImM
https://bit.ly/30rHg5B
https://bit.ly/3wR0cXj
https://bit.ly/3Husj3u
https://bit.ly/3DnB6lu
https://bit.ly/3qE8IYN
https://dailygram.com/index.php/blog/1013089/rolex-history-one/
https://tinyurl.com/p5wxazkw
https://tinyurl.com/2zk8vud5
https://tinyurl.com/86nfmaxd
https://tinyurl.com/s8a69dka
https://tinyurl.com/4jecc68m
https://tinyurl.com/drty3n5d
https://orologimeccanici.jouwweb.nl/770097_il-rolex-submariner
http://tiny.cc/j4pluz
http://tiny.cc/l4pluz
http://tiny.cc/1ypluz
http://tiny.cc/2ypluz
http://tiny.cc/3ypluz
https://orologimeccanici.jouwweb.nl/770103_qual-e-il-rolex-meno-costoso
https://orologimeccanici.jouwweb.nl/770110_rolex-history-one
https://rebrand.ly/qk0p0w5
https://rebrand.ly/mpeqpfx
https://rebrand.ly/ffxfdjv
https://rebrand.ly/6l1gtt3
https://rebrand.ly/z67vjdn
https://rebrand.ly/epj97wr