# HTML DOM Radio 對象
## Radio 對象
Radio 對象代表 HTML 表單中的單選按鈕。
在 HTML 表單中 <input type="radio"> 每出現一次,一個 Radio 對象就會被創建。
單選按鈕是表示一組互斥選項按鈕中的一個。當一個按鈕被選中,之前選中的按鈕就變為非選中的。
當單選按鈕被選中或不選中時,該按鈕就會觸發 onclick 事件句柄。
您可通過遍歷表單的 elements[] 數組來訪問 Radio 對象,或者通過使用 document.getElementById()。
## Radio 對象屬性
| 屬性 | 描述 |
| --- | --- |
| [accessKey](/jsref/prop_radio_accesskey.asp) | 設置或返回訪問單選按鈕的快捷鍵。 |
| [alt](/jsref/prop_radio_alt.asp) | 設置或返回在不支持單選按鈕時顯示的替代文本。 |
| [checked](/jsref/prop_radio_checked.asp) | 設置或返回單選按鈕的狀態。 |
| [defaultChecked](/jsref/prop_radio_defaultchecked.asp) | 返回單選按鈕的默認狀態。 |
| [disabled](/jsref/prop_radio_disabled.asp) | 設置或返回是否禁用單選按鈕。 |
| [form](/jsref/prop_radio_form.asp) | 返回一個對包含此單選按鈕的表單的引用。 |
| [id](/jsref/prop_radio_id.asp) | 設置或返回單選按鈕的 id。 |
| [name](/jsref/prop_radio_name.asp) | 設置或返回單選按鈕的名稱。 |
| [tabIndex](/jsref/prop_radio_tabindex.asp) | 設置或返回單選按鈕的 tab 鍵控制次序。 |
| [type](/jsref/prop_radio_type.asp) | 返回單選按鈕的表單類型。 |
| [value](/jsref/prop_radio_value.asp) | 設置或返回單選按鈕的 value 屬性的值。 |
## 標準屬性
| 屬性 | 描述 |
| --- | --- |
| [className](/jsref/prop_classname.asp) | 設置或返回元素的 class 屬性。 |
| [dir](/jsref/prop_dir.asp) | 設置或返回文本的方向。 |
| [lang](/jsref/prop_lang.asp) | 設置或返回元素的語言代碼。 |
| [title](/jsref/prop_title.asp) | 設置或返回元素的 title 屬性。 |
## Radio 對象方法
| 方法 | 描述 |
| --- | --- |
| [blur()](/jsref/met_radio_blur.asp) | 從單選按鈕移開焦點。 |
| [click()](/jsref/met_radio_click.asp) | 在單選按鈕上模擬一次鼠標點擊。 |
| [focus()](/jsref/met_radio_focus.asp) | 為單選按鈕賦予焦點。 |
- HTML 標簽列表
- HTML <!--...--> 標簽
- HTML <!DOCTYPE> 標簽
- HTML <a> 標簽
- HTML <abbr> 標簽
- HTML <acronym> 標簽
- HTML <address> 標簽
- HTML <applet> 標簽
- HTML <area> 標簽
- HTML <article> 標簽
- HTML <aside> 標簽
- HTML <audio> 標簽
- HTML <b> 標簽
- HTML <base> 標簽
- HTML <basefont> 標簽
- HTML <bdi> 標簽
- HTML <bdo> 標簽
- HTML <big> 標簽
- HTML <blockquote> 標簽
- HTML <body> 標簽
- HTML <br> 標簽
- HTML <button> 標簽
- HTML <canvas> 標簽
- HTML <caption> 標簽
- HTML <center> 標簽
- HTML <cite> 標簽
- HTML <em> <strong> <dfn> <code> <samp> <kbd><var> <cite> 標簽
- HTML <col> 標簽
- HTML <colgroup> 標簽
- HTML <command> 標簽
- HTML <datalist> 標簽
- HTML <dd> 標簽
- HTML <del> 標簽
- HTML <details> 標簽
- HTML <dialog> 標簽
- HTML <dir> 標簽
- HTML <div> 標簽
- HTML <dl> 標簽
- HTML <dt> 標簽
- HTML <embed> 標簽
- HTML <fieldset> 標簽
- HTML <figcaption> 標簽
- HTML <figure> 標簽
- HTML <font> 標簽
- HTML <footer> 標簽
- HTML <form> 標簽
- HTML <frame> 標簽
- HTML <frameset> 標簽
- HTML <h1> 到 <h6> 標簽
- HTML <head> 標簽
- HTML <header> 標簽
- HTML <hr> 標簽
- HTML <html> 標簽
- HTML <i> 標簽
- HTML <iframe> 標簽
- HTML <img> 標簽
- HTML <input> 標簽
- HTML DOM Button 對象
- HTML DOM Checkbox 對象
- HTML DOM Color 對象
- HTML DOM Input Date 對象
- HTML DOM Datetime 對象
- HTML DOM Datetime Local 對象
- HTML DOM Email 對象
- HTML DOM FileUpload 對象
- HTML DOM Hidden 對象
- HTML DOM Input Image 對象
- HTML DOM Month 對象
- HTML DOM Number 對象
- HTML DOM Password 對象
- HTML DOM Input Range 對象
- HTML DOM Radio 對象
- HTML DOM Reset 對象
- HTML DOM Input Search 對象
- HTML DOM Submit 對象
- HTML DOM Text 對象
- HTML DOM Input Time 對象
- HTML DOM Input URL 對象
- HTML DOM Input Week 對象
- HTML <ins> 標簽
- HTML <keygen> 標簽
- HTML <label> 標簽
- HTML <legend> 標簽
- HTML <li> 標簽
- HTML <link> 標簽
- HTML <main> 標簽
- HTML <map> 標簽
- HTML <mark> 標簽
- HTML <menu> 標簽
- HTML <menuitem> 標簽
- HTML <meta> 標簽
- HTML <meter> 標簽
- HTML <nav> 標簽
- HTML <noframes> 標簽
- HTML <noscript> 標簽
- HTML <object> 標簽
- HTML <ol> 標簽
- HTML <optgroup> 標簽
- HTML <option> 標簽
- HTML <output> 標簽
- HTML <p> 標簽
- HTML <param> 標簽
- HTML <pre> 標簽
- HTML <progress> 標簽
- HTML <q> 標簽
- HTML <rp> 標簽
- HTML <rt> 標簽
- HTML <ruby> 標簽
- HTML <s> 標簽
- HTML <script> 標簽
- HTML <section> 標簽
- HTML <select> 標簽
- HTML <small> 標簽
- HTML <source> 標簽
- HTML <span> 標簽
- HTML <strike> 標簽
- HTML <style> 標簽
- HTML <sub> 標簽
- HTML <summary> 標簽
- HTML <sup> 標簽
- HTML <table> 標簽
- HTML <tbody> 標簽
- HTML <td> 標簽
- HTML <textarea> 標簽
- HTML <tfoot> 標簽
- HTML <th> 標簽
- HTML <thead> 標簽
- HTML <time> 標簽
- HTML <title> 標簽
- HTML <tr> 標簽
- HTML <track> 標簽
- HTML <tt> 標簽
- HTML <u> 標簽
- HTML <ul> 標簽
- HTML <video> 標簽
- HTML <wbr> 標簽
- HTML 全局屬性
- HTML accesskey 屬性
- HTML class 屬性
- HTML contenteditable 屬性
- HTML contextmenu 屬性
- HTML data-* 屬性
- HTML dir 屬性
- HTML draggable 屬性
- HTML dropzone 屬性
- HTML hidden 屬性
- HTML id 屬性
- HTML lang 屬性
- HTML spellcheck 屬性
- HTML style 屬性
- HTML tabindex 屬性
- HTML title 屬性
- HTML translate 屬性
- HTML 事件屬性
- HTML 5 視頻/音頻參考手冊
- HTML 5 Canvas 參考手冊
- HTML 元素和有效的 DTD
- HTML 顏色名
- HTML 字符集
- HTML ASCII 參考手冊
- HTML ISO-8859-1 參考手冊
- HTML 4.01 符號實體
- HTML URL 編碼
- HTML 語言代碼參考手冊
- HTTP 狀態消息
- HTTP 方法:GET 對比 POST
- 免責聲明