简体   繁体   中英

Request.Form and radio button ids

I have the an approximation of the following

input id='rb1' name='rb1' type='radio' 
input id='rb2' name='rb1' type='radio' 

eg both radios share the same name so only one can be selected

I want to be able to use Request.Form to see which one has been selected. However all I get in Request.Form is the name eg rb1. Is there any way to detect the actual id of the control that has been pressed eg rb1 and rb2?

I dont want to use server controls for this for reasons I'm not going to bore you with.

<input id='rb1' name='rb1' type='radio' value='rb1' />
<input id='rb2' name='rb1' type='radio' value='rb2' />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM