I need the imput tag to have a double name as a class, for example:
<input class="firstClass secondClass" type="radio" name="firstNane secondName" id="step1-5" value="Размер автомобиля: Джип"> The standard says the following
It is not necessary to have an empty string. Any value for the name
_charset_is special:
which in Russian sounds like
If an attribute is specified, its value must not be an empty string. It is allowed to specify any non-empty value, except for the
_charset_value.
Therefore, you can actually specify any line with a space, even though there isn’t. When sending the form to the server, you will receive the corresponding key in the $_POST array (for php). But you will not be able to access this element as either firstName or lastName separately, only the whole. In general, in js / jquery, you can specify a selector as $("input[name*='firstName']") , but, frankly, there is no particular point in all this.
Can be passed as an array
<input name="xd[]" value="firstName"/> <input name="xd[]" value="lastName"/> <input name="xd[]" value="testName"/> Process
$_POST['xd'][0] == 'firstName' $_POST['xd'][2] == 'testName' Source: https://ru.stackoverflow.com/questions/845737/
All Articles