delphi android WebBrowser.LoadFromStrings? |
缺席
|
test28
一般會員 ![]() ![]() 發表:28 回覆:28 積分:16 註冊:2013-08-26 發送簡訊給我 |
unit umap1;
interface uses ... type TForm1 = class(TForm) WebB: TWebBrowser; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; const s1= '<!DOCTYPE html>' '<html>' '<head>' ... '</style>' '' '' 'var map;' 'function initialize() {' 'var mapOptions = {' 'zoom: 18,' 'center: new google.maps.LatLng(-34.397, 150.644)' '};' 'map = new google.maps.Map(document.getElementById("map-canvas"),' 'mapOptions);' '}' 'google.maps.event.addDomListener(window, "load", initialize);' '' '</head>' '<body>' '' '</body>' '</html>' ; implementation {$R *.fmx} procedure TForm1.Button1Click(Sender: TObject); begin WebBrowser.LoadFromStrings(s1, ''); end; end. <!--[if gte mso 9]><xml><br /> </xml><![endif]--> minor-latin;mso-fareast-font-family:新細明體;mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri;mso-hansi-theme-font:minor-latin">經緯度 mso-ascii-font-family:Calibri;mso-ascii-theme-font:minor-latin;mso-fareast-font-family: 新細明體;mso-fareast-theme-font:minor-fareast;mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin">傳經緯度給Javascrip? </xml><![endif]--><!--[if gte mso 9]><xml><br /> </xml><![endif]--><!--[if gte mso 10]> <style><br /> /* Style Definitions */ table.MsoNormalTable {mso-style-name:表格內文; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; mso-bidi-font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-font-kerning:1.0pt;} </style><br /> 編輯記錄
test28 重新編輯於 2014-05-15 02:56:55, 註解 無‧
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |