+ 2
Correction of my if else statement
https://code.sololearn.com/WPOGUJGfH839/?ref=app In this code just check the javascript if else there is something wrong with it just run first and continue to last page where you have to enter fields. Ask me if didn't understand my question
4 Réponses
+ 2
if (c.value != "") is correct
if (c.value = "!") is wrong
Recall that the equality operator is == and the inequality is !=
+ 2
In your code you have:
if ( c.value = "" ) {
.......
}
This sets c.value to "" and then evaluates to false because the empty sting "" is a falsy value in JS. What you wanted to write is != instead of =
+ 1
When all inputs are filled and when u submit it it again says fill all inputs which was set by me when alert shows automatically the phone number resets input field
+ 1
Can u please just edit it and post here? Again