为选中的单选按钮分配一个初始值单选、按钮、分配、初始值

2023-09-06 18:50:21 作者:乄゛遗忘丶过去的痛

如何分配最初在 HTML 中选中的单选按钮的值?

How do I assign the value of a radio button initially as checked in HTML?

推荐答案

您可以为此使用 checked 属性:

You can use the checked attribute for this:

<input type="radio" checked="checked">