G
G
gomer17262015-12-08 16:27:32
PHP
gomer1726, 2015-12-08 16:27:32

How to change the appearance of radio buttons in html?

<form action="<?$_REQUEST['SCRIPT_NAME'];?>" method="get">
<input class="r_button" type="radio" name="name" onclick="sample()" id="r_1" />
<label for="r_1">Описание радиокнопки</label>
<input class="r_button" type="radio" name="name" id="r_2" />
<label for="r_2">Описание радиокнопки</label>
<input type="submit" name="ok">
</form>

there is such a code, but here only name="on" is passed by the get parameter, and I don’t even know which one, you can’t change the name, is it possible to sort through the id or something or the class? The name cannot be changed for the correctness of the code, this is another ema in general, I need one thing to be passed by the get parameter

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mr Crabbz, 2015-12-08
@Punkie

well, add value="1", value="2" to the inputs. Business then...

D
Dmitry Belyaev, 2015-12-08
@bingo347

data is sent from the form to the server for the radio buttons in the format
name=value
where name is the value of the attribute name
value is the value of the attribute value
You don't specify the value attribute, so the default 'on' is
used for checkboxes and select-option the same policy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question