我有2个单选按钮。如何在默认情况下保持一个按钮 [英] i have 2 radio button. how can keep one button by default checked
本文介绍了我有2个单选按钮。如何在默认情况下保持一个按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有2个单选按钮。如何在默认情况下保持一个按钮
i have 2 radio button. how can keep one button by default checked
推荐答案
你只需要提供 checked =checked
例如:
You just need to provide checked="checked"
for e.g:
<form id="form1" runat="server">
<input id="rad1" type="radio" checked="checked" />
<input id="rad2" type="radio" />
</form>
这里是第一个Rad io按钮将在运行时被检查,而第二个按钮将被取消选中
Here the first Radio button will be checked at run time whereas the second one will be unchecked
在这里查看: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.radiobutton%28v=vs .110%29.aspx [ ^ ]。
你能看到名为的房产吗?
?有问题吗?
-SA
Look here: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.radiobutton%28v=vs.110%29.aspx[^].
Can you see the property namedChecked
? Any questions?
—SA
嗨...
<input id="Radio" type="radio" checked="checked" />
<input id="Radio1" type="radio" />
此处 by默认第一个被检查第一个和第二个没有被选中一个。
谢谢你。
Here by default 1st is checked Radio one and 2nd one is not checked one.
Thank u.
这篇关于我有2个单选按钮。如何在默认情况下保持一个按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文