7月 19, 2006

自訂停駐點位置

有時按Tab鍵切換物件,希望自訂順序可用tabIndex指定,以下為範例

//creative三個文字框
this.createTextField("a1", this.getNextHighestDepth(), 10, 10, 130, 22);
a1.border = true;
a1.type = "input";
a1.text="我是a1,請點我開始"
this.createTextField("a2", this.getNextHighestDepth(), 10, 40, 130, 22);
a2.border = true;
a2.type = "input";
a2.text="我是a2"
this.createTextField("a3", this.getNextHighestDepth(), 10, 70, 130, 22);
a3.border = true;
a3.type = "input";
a3.text="我是a3"
//設定三個文字框focus順序
a1.tabIndex =1;
a2.tabIndex =3;
a3.tabIndex =2;

沒有留言: