| focus() | ใช้กำหนดให้ button ณ ตำแหน่งที่กำหนด ที่อยู่ภายใน buttonGroup อยู่ในสถานะ ได้รับ focus |
|---|
method:focus ( index )
return type:void
content:ใช้กำหนดให้ button ณ ตำแหน่งที่กำหนด ที่อยู่ภายใน buttonGroup อยู่ในสถานะ ได้รับ focus
example:var attributes = { name: "button-group", disabled: false }; var group_button = new YAHOO.widget.ButtonGroup ( "bgroup", attributes ); group_button.addButtons ( [ { label: "Radio 1", value: "1", checked: true }, { label: "Radio 2", value: "2" }, { label: "Radio 3", value: "3" } ] ); group_button.focus ( 1 );