API version 1
- ‐
R
string
url¶
表示中のページのURLを表します。
初期値は""です。
使用例
CRSダウンロード
Form HtmlV_use {
X = 0;
Y = 0;
width = 826;
Height = 644;
Label lbl_event {
x = 488;
y = 439;
Width = 212;
Height = 111;
BgColor = Color.White;
Function OnClicked( e ) {
this.clear();
}
}
HtmlView HtmlView1 {
x = 15;
y = 210;
width = 700;
Height = 219;
Silent = true;
Function OnAlert( e ) {
^.lbl_event += e.EventName + "イベント発生" + "\n";
^.lbl_event += e.message + "\n";
}
Function OnConfirm( e ) {
^.lbl_event += e.EventName + "イベント発生" + "\n";
^.lbl_event += e.message + "\n";
}
}
GroupBox GroupBox1 {
x = 530;
y = 12;
width = 275;
height = 189;
Title = "AllowAction";
tabIndex = 60000;
}
NumberEdit allow_stat {
x = 553;
y = 32;
Width = 51;
Height = 27;
}
CheckBox chk_Allow {
x = 538;
y = 69;
width = 257;
height = 124;
tabIndex = 1;
Border = BORDER_NONE;
CheckItem CheckItem1[6] {
width = 250;
Height = 20;
this[0].Title = "ALLOW_NONE";
this[1].Title = "ALLOW_SCRIPT";
this[2].Title = "ALLOW_POPUP";
this[3].Title = "ALLOW_ACCESSFROMLOCALCONTENT";
this[4].Title = "ALLOW_NEWTAB";
this[5].Title = "ALLOW_ALL";
Function OnTouch( e ) {
var allow = 0;
if (^.CheckItem1[1].Selected == true) allow += HtmlView.ALLOW_SCRIPT;
if (^.CheckItem1[2].Selected == true) allow += HtmlView.ALLOW_POPUP;
if (^.CheckItem1[3].Selected == true) allow += HtmlView.ALLOW_ACCESSFROMLOCALCONTENT;
if (^.CheckItem1[4].Selected == true) allow += HtmlView.ALLOW_NEWTAB;
if (^.CheckItem1[5].Selected == true) allow = HtmlView.ALLOW_ALL;
if (^.CheckItem1[0].Selected == true) {
allow = HtmlView.ALLOW_NONE;
for (var i=1;i<^.CheckItem1.length;i++) {
^.CheckItem1[i].Selected = false;
}
}
^.^.HtmlView1.AllowAction = allow;
^.^.allow_stat = ^.^.HtmlView1.AllowAction;
}
}
}
TextBox TextBox1 {
x = 23;
y = 33;
Width = 390;
Height = 27;
Value = "https://www.opst.co.jp/bizbrowser";
}
Button Button1 {
x = 29;
y = 79;
Width = 95;
Height = 33;
Title = "GoURL";
Function OnTouch( e ) {
^.HtmlView1.GoUrl(^.TextBox1);
}
}
TextBox TextBox2 {
x = 146;
y = 87;
Width = 51;
Height = 24;
value &= ^.HtmlView1.Silent;
}
Button Button3 {
x = 213;
y = 82;
Width = 118;
Height = 32;
Title = "Silentの変更";
Function OnTouch( e ) {
try {
^.HtmlView1.Silent = !^.HtmlView1.Silent;
}
catch(e) {
MessageBox("Message=" + str(e.Message) + "\r\nCategory=" + str(e.Category) + "\r\nCode="+ str(e.Code) + "\r\nSubCode=" + str(e.subCode));
}
}
}
Label lbl_Busy {
x = 437;
y = 85;
Width = 54;
Height = 25;
Border = BORDER_FLATSUNKEN;
BgColor = Color.White;
}
Button btnBusy {
x = 356;
y = 84;
Width = 73;
Height = 28;
altKey = DisplayObject.KEY_F03;
title = "IsBusy(F3)";
Function OnTouch( e ) {
try {
^.lbl_Busy.Value = ^.HtmlView1.IsBusy;
}
catch(e) {
MessageBox("Message=" + str(e.Message) + "\r\nCategory=" + str(e.Category) + "\r\nCode="+ str(e.Code) + "\r\nSubCode=" + str(e.subCode));
}
}
}
if (and(HtmlView1.AllowAction, HtmlView.ALLOW_NONE)) {
chk_Allow.CheckItem1[0].Selected = true;
}
if (and(HtmlView1.AllowAction, HtmlView.ALLOW_SCRIPT)) {
chk_Allow.CheckItem1[1].Selected = true;
}
if (and(HtmlView1.AllowAction, HtmlView.ALLOW_POPUP)) {
chk_Allow.CheckItem1[2].Selected = true;
}
if (and(HtmlView1.AllowAction, HtmlView.ALLOW_ACCESSFROMLOCALCONTENT)) {
chk_Allow.CheckItem1[3].Selected = true;
}
if (and(HtmlView1.AllowAction, HtmlView.ALLOW_NEWTAB)) {
chk_Allow.CheckItem1[4].Selected = true;
}
TextBox2.Value = HtmlView1.Silent ? "true" : "false";
}