Thank you so much for the most logical and straightforward method.
@alexthanasai9757
2 жыл бұрын
simplest one i've seen.Much love
@codewithbubb
Жыл бұрын
Thanks Alex!
@ichiroutakashima4503
Жыл бұрын
just as much as the other comments, this video has truly helped me.
@codewithbubb
Жыл бұрын
You’re welcome Ichirou. Glad it helped you out. Are you building a form with JavaScript?
@ichiroutakashima4503
Жыл бұрын
@@codewithbubb Yes, I've been stuck for a week because of my confusion. From making select ratings forms, i.e. "You selected x out of 5 stars." and; making up quiz forms that validates your choices based on true or false values. I've been stuck for over a week and truly am having problems grasping the concept of radio buttons. I've searched and searched and searched but there really aren't many videos focused on radio buttons in-depth, which is weird in my opinion.
@codewithbubb
Жыл бұрын
@@ichiroutakashima4503 Hmm, yeah never thought about it that much - I guess they are kinda weird especially when you compare them to other inputs in HTML like text. Maybe there should be a in-depth comparison of check-boxes, radios and other inputs? 🤔
@ichiroutakashima4503
Жыл бұрын
@@codewithbubb one thing I really wished for. an in-depth guide and the many uses of the said elements. Because there really aren't any...
@jmjacobs45
8 ай бұрын
You da man!
@codewithbubb
8 ай бұрын
I'm a man!
@Adhithya2003
Жыл бұрын
Thank you good sir.
@codewithbubb
Жыл бұрын
You're welcome!
@CRUSHED_GREMLIN_RL
2 жыл бұрын
Dude...u saved me one night of sleep✨✨
@codewithbubb
2 жыл бұрын
Haha! Amazing, hope you feel nice and relaxed now.
@terry_swd
Жыл бұрын
The CSS selector method is just not working for me for some reason. I've tried it over and over again with different versions, and I keep getting "null" for the result. Using Google Chrome here but tried Edge as well. No idea why! Ahhh
@codewithbubb
Жыл бұрын
Hey Taras! What is the selector you're passing in? If the result is null then it's just not finding the element. Are you doing this in the dev tools of Chrome/Edge?
@terry_swd
Жыл бұрын
@@codewithbubb Thanks for your response codebubb. I am doing this in the console of Chrome browser. Here is the code I'm passing in: *const selected = document.querySelector("input[name='pets']:checked");* And as I said, I keep getting null. I have no idea what's going on haha. If you could please advise.
@codewithbubb
Жыл бұрын
@@terry_swd Hi again, so I assume you have an element you're trying to grab - I've just tried this out and it works OK with the selector you're using but only when the radio is checked. When it's not checked it will of course return null.
@terry_swd
Жыл бұрын
@@codewithbubb Yes codebubb, your assumptions are all correct. And yes a radio button checked when I try to console log its value. I've tried this again and again with many different variations and it's just not giving me the value with the CSS selector method. It works when I use the forEach method or a loop on the radio buttons, but not with the CSS:checked selector. I am just out of ideas lol.
@coder_2711
Жыл бұрын
me too getting the same ...null
@prasannsurya9415
2 жыл бұрын
Could you make one video for, how to get the date form user with help of default html date type
@codewithbubb
2 жыл бұрын
Sure, do you mean displaying todays date on the page?
@missqueen3877
Жыл бұрын
Thank a lot 🎉🎉🎉
@Medo-jr5cu
2 жыл бұрын
Thanks you for all thing
@heff2823
7 күн бұрын
Whenever I try to store it in a variable through let, it returns an error for me. "Uncaught TypeError: Cannot read properties of null (reading 'value')" Here are the different ways I tried it. /*let inputGender=document.querySelector('input[name="gender]"]:checked'); console.log(inputGender.value); /*let inputGender=document.querySelector('input[name="gender]"]:checked').value; console.log(inputGender);
@prasannsurya9415
2 жыл бұрын
Nice dude
@codewithbubb
2 жыл бұрын
Thank you very much 👍
@user-qg7bp3pb1w
3 жыл бұрын
can i see the correct answer if the multiple questions one by one on online and there isn't checked words to let u know the right answer plz tell me
Пікірлер: 34