如何在输入控件的复选框中设置组 [英] how to set group in check box in input control

查看:43
本文介绍了如何在输入控件的复选框中设置组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,
我正在为复选框使用输入控件,并且还为所有输入定义了相同的名称,但毕竟它会检查所有检查,并且我只想一次检查一次,如果我再次检查则取消检查.
请帮帮我.

dear all,
i am using input control for checkbox and also define name same for all the input but after all it check all the check and i want to check only on one time if i check another then it unchek.
please help me.

str &= "    <tr>" 'sport person
         str &= "      <td><label>ApplicantSportPerson<font color='#ff7100'>&nbsp;*</font></label>"
         str &= "      </td>"
         str &= "      <td colspan='3'>"
         str &= "        <input type='checkbox' name='Sport' value='1'  />Yes "
         str &= "            <div class='divError' id='divSportPerson_" & i & "' style='display: none'>"
         str &= "               <img src='images/error.gif' />Please select Applicant Sport Person...</div> "
         str &= "      </td>"
         str &= "    </tr>"


它用于div conlol.


it is use in div conlol.

divsportdetails.InnerHtml = str

推荐答案

HI,
如果只需要一个选择,则必须使用单选按钮,并在所有单选按钮中设置组名相同,从而创建一组单选按钮.
试试吧.

If you have to only one choice then you must use radio button and set group name same in all radio button which through create one group of radio button.
Try it.


这篇关于如何在输入控件的复选框中设置组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆