why we are write first in const the id onst myCheckBox = document.getElementById("myCheckBox"); const visaBtn = document.getElementById("visaBtn"); const masterCardBtn = document.getElementById("masterCardBtn"); const payPalBtn = document.getElementById("payPalBtn"); const mySubmit = document.getElementById("mySubmit"); const subResult = document.getElementById("subResult"); const paymentResult = document.getElementById("paymentResult"); that values ?? what is reason for write this @@masternobody1896
Bro, this new JS series is just great because it is full of examples and mini project in which we can apply the knowledge to a real situation. Thanks a bunch!
// .checked = property that determines the checked state of an
// HTML checkbox or radio button element
const myCheckBox = document.getElementById("myCheckBox");
const visaBtn = document.getElementById("visaBtn");
const masterCardBtn = document.getElementById("masterCardBtn");
const payPalBtn = document.getElementById("payPalBtn");
const mySubmit = document.getElementById("mySubmit");
const subResult = document.getElementById("subResult");
const paymentResult = document.getElementById("paymentResult");
mySubmit.onclick = function(){
if(myCheckBox.checked){
subResult.textContent = `You are subscribed!`;
}
else{
subResult.textContent = `You are NOT subscribed!`;
}
if(visaBtn.checked){
paymentResult.textContent = `You are paying with Visa`;
}
else if(masterCardBtn.checked){
paymentResult.textContent = `You are paying with MasterCard`;
}
else if(payPalBtn.checked){
paymentResult.textContent = `You are paying with PayPal`;
}
else{
paymentResult.textContent = `You must select a payment type`;
}
}
My website
subscribe
Visa
MasterCard
PayPal
submit
body{
font-family: Verdana;
font-size: 2em;
}
#mySubmit{
font-size: 1em;
}
epic
why we are write first in const the id
onst myCheckBox = document.getElementById("myCheckBox");
const visaBtn = document.getElementById("visaBtn");
const masterCardBtn = document.getElementById("masterCardBtn");
const payPalBtn = document.getElementById("payPalBtn");
const mySubmit = document.getElementById("mySubmit");
const subResult = document.getElementById("subResult");
const paymentResult = document.getElementById("paymentResult");
that values ??
what is reason for write this @@masternobody1896
Thanks a lot sir🥰
Bro, this new JS series is just great because it is full of examples and mini project in which we can apply the knowledge to a real situation. Thanks a bunch!
Exactly, the small handson are very useful for learning the difficult concepts
Thanks for making this series. Without you I would've never successed!
This video was the most useful, that's why I'm commenting on this one lol.
Thanks, bro. You're a real bro 💪
Incredible - I'm going through each video. thank you so much.
You are a real Bro to us . We love you 😘
This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.
This is exactly the way I can understand js.
Thanks as always ❤
Really cool tutorial, thanks!
Daddy Brocode teaches me lots
you're doing good videos I like it
You are the best
do videos for the select dropdown .
* this works *
onlick😂😂🤣🤣
Magic!
Clear radio buttons on page refresh:
window.onload = function () {
let radios = document.getElementsByName('card');
radios.forEach(function (radio) {
radio.checked = false;
});
};