提交后是否选中验证单选按钮 [英] validate radio button checked or not after submit
本文介绍了提交后是否选中验证单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
//从数据库获取网关名称
//Getting gateway name from database
<div>
<label class="for">;
Payment method:
</label>;
@foreach (var pgName in Model.lstInfo)
{
<span class="formfield jqtransform">
@Html.RadioButton("PGName", pgName.ID, pgName.PGName)
</span>
<label class="for" for="PGName">@pgName.PGName
}
</div>
推荐答案
假设你问的是,如何检查特定的单选按钮是否被选中,这里是检查jQuery的解决方案 -
Assuming you are asking that, how to check whether particular radio button is checked or not, here is solution to check in jQuery-
var isThisChecked =
(' #YourId')。是(' :checked');
您可以使用post方法。
You can put in post method.
这篇关于提交后是否选中验证单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文