Setter
Defines code which is called to modify the value of a property. The variable val is defined as the value to set the property to.
Example:
<property name="size">
<setter>
<![CDATA[
var sz=parseInt(val);
if (sz < 0) sz=0;
if (sz > 100) sz=100;
this.setAttribute("size",sz);
]]>
</setter>
</property>
プロパティの値を変更するために呼ばれるコードを定義する。変数 val は、プロパティに設定する値として定義されている。
例 :
<property name="size">
<setter>
<![CDATA[
var sz=parseInt(val);
if (sz < 0) sz=0;
if (sz > 100) sz=100;
this.setAttribute("size",sz);
]]>
</setter>
</property>
属性:
| id |
属性:
id
Type: element id, must be unique in the window
A unique identifier so that you can identify the setter with. You can use this as a parameter to getElementById and other DOM functions and to reference the element in style sheets.
型 : 要素 id。ウィンドウ内で一意でなければならない。
setter を識別できるユニークな識別子。getElementById や他の DOM 関数へのパラメータとして、またスタイルシートの要素への参照として使用することができる。