Radio
An element that can be turned on and off. Radio buttons are almost always grouped together in groups. Only one radio button within the same radiogroup may be selected at a time. The user can switch which radio button is turned on by selecting it with the mouse or keyboard. Other radio buttons in the same group are turned off. A label, specified with the label attribute may be added beside the radio button to indicate to the user as to its function.
オン・オフ可能な要素。ラジオボタンはいくつかのグループとしてひとまとまりにされるのが常である。一つの radiogroup に含まれるラジオボタンのうちの 1 つだけが選択され得る。利用者はマウスまたはキーボードにより、どのラジオボタンをオンにするかを切替えられる。同じグループ内の他のラジオボタンはオフにされる。利用者に機能を説明するために、ラベルを label 属性で指定して、ラジオボタンの隣に表示させることができる。
プロパティとメソッド:
accessKey | accessible | crop | disabled | label |
radioGroup | selected | value |
属性:
XUL Element から継承:
align
allowevents
allownegativeassertions
class
coalesceduplicatearcs
collapsed
container
containment
context
contextmenu
datasources
debug
dir
empty
equalsize
flags
flex
height
hidden
id
insertafter
insertbefore
left
maxheight
maxwidth
menu
minheight
minwidth
mousethrough
observes
ordinal
orient
pack
persist
popup
position
ref
removeelement
sortDirection
sortResource
sortResource2
statustext
style
template
tooltip
tooltiptext
top
uri
wait-cursor
width
accesskey
Type: character
This should be set to a letter that is used as a shortcut key. This letter should be one of the characters that appears in the label text for the radio. This letter will typically be drawn underlined, although this behavior will be platform and theme specific. When the user presses ALT (or a similar key that varies on each platform) and the access key, the radio will be activated from anywhere in the window. Although the value is case insensitive, a letter with the case matching the accesskey attribute will used if both cases exist in the label.
型 : character
ショートカットキーとして使う文字に設定する。この文字は、ラジオボタンのラベルテキストに現れる文字の一つである必要がある。この文字は一般に下線付きで表示される。一方、その振る舞いはプロットフォームやテーマに依存する。ユーザが ALT (またはプラットフォームによる同様のキー) とアクセスキーを押すと、ウィンドウのどこからでもラジオボタンは起動される。この値は文字の大小には関しないが、ラベルに両方がある場合には、 accesskey 属性にマッチする方の文字が使用される。
command
Type: element id
Set to an id of a command element that is being observed by the element.
型 : element id
この要素に監視されている command 要素の id を設定する。
crop
Type: one of the values below
If the label of the radio is too small to fit in its given space, the text will be cropped on the side specified by the crop attribute. An ellipsis will be used in place of the cropped text. If the box direction is reversed, the cropping is reversed.
- start: The text will be cropped on its left side.
- end: The text will be cropped on its right side.
- left: (Deprecated) The text will be cropped on its left side.
- right: (Deprecated) The text will be cropped on its right side.
- center: The text will be cropped on both sides.
- none: The text will be not be cropped using an ellipsis. However, the text will simply be cut off if it is too large. The side depends on the CSS text alignment.
型 : 以下の値の一つ
与えられたスペースが小さくてラジオボタンのラベルがその場所に合わないとき、crop 属性で指定した側にテキストは切り取られる。切り取られたテキストの位置には、省略記号が用いられる。ボックスの方向が逆のときは、切り取りも逆になる。
- start: テキストの左側が切り取られる。
- end: テキストの右側が切り取られる。
- left: (非推奨) テキストの左側が切り取られる。
- right: (非推奨) テキストの右側が切り取られる。
- center: テキストの両側が切り取られる。
- none: テキストの切り取りに省略記号が用いられない。テキストが非常に大きいときには、単に切られるだけである。側は CSS のテキスト配置 (alignment) に依存する。
disabled
Type: boolean
Indicates whether the radio is disabled or not. If this attribute is set to true, the radio is disabled. This is usually drawn with the text in grey. If the radio is disabled, it does not respond to user actions. The element cannot be focused and the command event will not fire. The element will still respond to mouse events. To enable the radio, leave the attribute out entirely as opposed to setting the value to false.
型 : boolean
ラジオボタンが無効か有効かを表す。この属性を true に設定すると、ラジオボタンは無効になる。通常、テキストが灰色で表示される。ラジオボタンが無効の場合には、ユーザアクションに応答しない。要素にフォーカスできず、またコマンドイベントは起きない。マウスイベントにはまだ応答する。ラジオボタンを有効にするには、値を false に設定したことに対応するものとして、この属性を取り除く。
focused
Type: boolean
This attribute is set to true if the radio element is focused.
型 : boolean
radio 要素がフォーカスされているときは、この属性は true に設定される。
label
Type: string
The label that will appear beside the radio. If this is left out, no text appears. The labels on radio buttons will wrap if there is not enough space.
型 : string
ラジオボタンの隣に表示するラベル。この属性がないときには、テキストは表示されない。十分なスペースが無いときには、ラジオボタンのラベルはラップする。
selected
Type: boolean
This attribute is set to true if the radio button is selected. To change the currently selected radio button, modify either the selectedIndex or selectedItem property of the radiogroup.
型 : boolean
ラジオボタンが選択されているとき、この属性は true に設定される。現在選択中のラジオボタンを変更するには、 radiogroup 要素の selectedIndex プロパティか selectedItem プロパティのどちらかを変更する。
src
Type: image URL
The URL of the image to appear on the radio. If this attribute is left out, no image appears.
型 : image URL
radio に表示す画像の URL。この属性がないと、画像は表示されない。
value
Type: string
You can associate a data value with each radio button.
型 : string
ラジオボタンそれぞれにデータ値を関連づけることができる。
プロパティとメソッド:
XUL Element から継承:
align
allowEvents
blur
boxObject
boxObject.element
boxObject.getLookAndFeelMetric
boxObject.height
boxObject.screenX
boxObject.screenY
boxObject.width
boxObject.x
boxObject.y
builder
className
click
collapsed
contextMenu
controllers
database
datasources
dir
doCommand
flex
focus
getElementsByAttribute
height
hidden
id
left
maxHeight
maxWidth
menu
minHeight
minWidth
observes
ordinal
orient
pack
persist
ref
resource
statusText
style
tooltip
tooltipText
top
width
Element から継承:
addEventListener
appendChild
attributes
childNodes
cloneNode
dispatchEvent
firstChild
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
insertBefore
isSupported
lastChild
localName
namespaceURI
nextSibling
nodeName
nodeType
nodeValue
normalize
ownerDocument
parentNode
prefix
previousSibling
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
tagName
accessKey
Gets and sets the value of the accesskey attribute.
accesskey 属性の値を取得・設定する。
accessible
Type: nsIAccessible
Returns the accessibility object for the radio.
Type: nsIAccessible
radio の accessibility オブジェクトを返す。
crop
Type: string
Gets and sets the value of the crop attribute.
型 : string
crop 属性の値を取得・設定する。
disabled
Type: boolean
Gets and sets the value of the disabled attribute.
型 : boolean
disabled 属性の値を取得・設定する。
label
Type: string
Gets and sets the value of the label attribute.
型 : string
label 属性の値を取得・設定する。
radioGroup
Type: radiogroup element
Returns the enclosing radiogroup that the radio element is contained within, which may or may not be its direct parent.
型 : radiogroup element
radio 要素がその中に含まれる radiogroup 要素を返す。この要素は直接の親要素であることも、そうでないこともあり得る。
selected
Type: boolean
This read-only property returns true if the radio button is selected.
型 : boolean
この読み込み専用プロパティは、ラジオボタンが選択されているとき true を返す。
value
Type: string
Gets and sets the value of the value attribute.
型 : string
value 属性の値を取得・設定する。