()
| 4 | |
| 5 | // 获取当前被选中的单选框的值 |
| 6 | function getSelectedRadioValue() { |
| 7 | let selectedValue = null; |
| 8 | |
| 9 | radioButtons.forEach(radioButton => { |
| 10 | if (radioButton.checked) { |
| 11 | selectedValue = radioButton.id; |
| 12 | } |
| 13 | }); |
| 14 | |
| 15 | return selectedValue; |
| 16 | } |
| 17 | |
| 18 | |
| 19 | // Save the API key when the Save button is clicked |