コードは次のとおりです。
/*
説明:チェックボックス制御
バージョン:1.1
注:チェックボックス制御の背後に続くテキスト
チェックボックスオブジェクトのhtc_mylabelを取得して表示することです
不確実な選択を増やすためにインデーター属性を更新および追加しました
*/
<public:component>
<public:attachevent = "oncontentready" onevent = "fninit()"/>
<public:actationevent = "onpropertychange" onevent = "fnpropertychange()"/>
<ScriptLanguage = "JavaScript">
varcheckboximg = window.document.createelement( "img");
imagearray = [];
imagearray ["checkbox_false"] = "checkbox_false.gif";
imagearray ["checkbox_false_down"] = "checkbox_false_down.gif";
imagearray ["checkbox_false_over"] = "checkbox_false_over.gif";
imagearray ["checkbox_true"] = "checkbox_true.gif";
Imagearray ["Checkbox_true_down"] = "checkbox_true_down.gif";
imagearray ["checkbox_true_over"] = "checkbox_true_over.gif";
imagearray ["Checkbox_indeter"] = "checkbox_indeter.gif";
Imagearray ["Checkbox_indeter_down"] = "checkbox_indeter_down.gif";
imagearray ["checkbox_indeter_over"] = "checkbox_indeter_over.gif";
functionpreload(path、obj){
(iinobj){
この[i] = newImage();
この[i] .src = path+obj [i];
}
これを返します。
}
preb = newPreload( "Images/"、Imagearray);
functionfninit(){
varo = element;
if(o.type == "チェックボックス"){
var_table = window.document.createelement( "table");
_table.cellspacing = "0px";
_table.cellpadding = "0px";
_table.border = "0px";
if(o.disabled){
_table.style.filter = "alpha(ofacity = 50)";
}
それ以外{
_table.style.filter = "";
}
_table.style.display = "inline";
var_tr = _table.insertrow();
var_td = _tr.insertcell();
if(o.checked){