p673_helloworld2.jsb
来自「javascript source code part2」· JSB 代码 · 共 72 行
JSB
72 行
<JSB>
<JSB_DESCRIPTOR NAME="HelloWorldC"
DISPLAYNAME="Hello World demonstration."
>
<JSB_PROPERTY NAME="AlertMessage"
PROPTYPE="JS"
TYPE="string"
DEFAULT_VALUE="Hello World"
READMETHOD="GetAlertMessage"
WRITEMETHOD="SetAlertMessage"
ISDEFAULT
SHORTDESCRIPTION="Content of message to be displayed"
>
<JSB_METHOD NAME="GetAlertMessage"
TYPE="string"
ISEXPERT
>
</JSB_METHOD>
<JSB_METHOD NAME="SetAlertMessage"
TYPE="void"
ISEXPERT
>
<JSB_PARAMETER NAME="NewValue"
TYPE="string"
>
</JSB_METHOD>
<JSB_METHOD NAME="ShowMessage" TYPE="void" >
<JSB_PARAMETER NAME="strContent"
TYPE="string"
>
</JSB_METHOD>
<JSB_CONSTRUCTOR>
function GetAlertMessage()
{
return this.AlertMessage;
}
function SetAlertMessage(strNewValue)
{
this.AlertMessage = strNewValue;
}
function ShowMessage(strMessage)
{
// Process the argument passed and display it.
var strText;
strText = strMessage + "!!!";
alert(strText);
}
//***
// The constructor
//
function HelloWorldC (params)
{
this.AlertMessage=params.AlertMessage;
this.SetAlertMessage=params.SetAlertMessage;
this.GetAlertMessage=params.GetAlertMessage;
ShowMessage(this.AlertMessage);
}
</JSB_CONSTRUCTOR>
</JSB>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?