如何选择适当的单选按钮 [英] how to select proper radio button
本文介绍了如何选择适当的单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<inputtype="radio"name="classcode"value="MO" önClick="setvalue('MO','22222','TRADE AC','B','09:00','15:00','M T W TH F S SU','MOTRA',strURL,'avail',false)">
<inputtype="radio"name="classcode"value="MO"onClick="setvalue('MO','11111','TRADE AC','B','09:00','15:00','M T W TH F S SU','MOTRA',strURL,'avail',false)">
<inputtype="radio"name="classcode"value="MO"onClick="setvalue('MO','44444','TRADE AC','B','09:00','15:00','M T W TH F S SU','MOTRA',strURL,'avail',false)">
<inputtype="radio"name="classcode"value="MO"onClick="setvalue('MO','55555','TRADE AC','B','09:00','15:00','M T W TH F S SU','MOTRA',strURL,'avail',false)">
您能告诉我如何选择特定的单选按钮,即使名称相同,值相同但onclick方法相同但参数不同如何从c#
Can you tell me how to choose specific radio button even though name are same , value are same but onclick methos is same but different paramenter how to select proper radiobutton from c#
推荐答案
我会将这个对象添加到函数中,以便它知道发件人是谁.
I would add the this object to the function, so that it know who the sender is.
function setvalue(sender, ...)
{
//use the sender object to identify the radiobutton
}
<inputtype="radio"name="classcode"value="MO"onClick="setvalue(this, 'MO','55555','TRADE AC','B','09:00','15:00','M T W TH F S SU','MOTRA',strURL,'avail',false)">
P.S. :具有相同名称的多个输入没有任何意义.我希望将它们更改为唯一的名称.
P.S. : It does not make sense to have multiple inputs with same name. I would rather change them to make unique name.
这篇关于如何选择适当的单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文