-1
I created two camps input
radio
for sex and put value="m"
and the other value="f"
. I left as a standard the input
with the value="m"
checked
(at startup is checked), but when sending to JS, even if I mark the input
value="f"
, he returns me "m"
because of checked
The input checked
it’s getting in the way, but I don’t want to take it out.
This is my verification code for input radio
"sex". Each input
has a class()
with the same name. I gave a
querySelectorAll();
and played in the variable sexo
. The idea is: if the first input (((sexo[0])))
is checked, so he’s m
, otherwise he is f
.
if(sexo[0].checked){
sexo1 = "m"
}else{
sexo1 = "f";
}
AKU you have several open questions it would be interesting you interact and credit (of course with your will) the answers, gets a unique hand the cool is when it becomes rewarding for both sides. Rethink.
– novic
It has how to elaborate a [mcve]?
– Woss
I don’t even know how to validate a sex radio input, let alone answer other people! Doesn’t mean I don’t agree, but I don’t have the knowledge to help other people yet
– AKU
AKU of course, but, I am saying the open questions, when answered, you have to test because usually an example is put. It is in this aspect I understand also your search for knowledge and needing we are there ...
– novic
The @Virgilionovic is saying that you haven’t accepted any of his answers in the questions you’ve already asked back. It is important to accept an answer when it solves your problem, because it helps other people in the future who go through the same problem, then first the accepted answer, because it is the one that the author indicates solved the problem. By doing so it also gives you a reputation bonus for who you responded to, as well as motivating those who responded to you in the future because you see that your efforts have been helpful.
– Isac
@That’s what Isac is all about in this cooperation.
– novic