⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p673_helloworld2.jsb

📁 javascript source code part2
💻 JSB
字号:
<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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -