+ 8
JS if & else not working..!😕
See JS code, after I click the Submit button if I have not filled anything in the input field, it gives an alert.....but even if I write something in the input field, it even then gives an alert......is there any fault in the JS code, please tell me https://code.sololearn.com/W0e908sXyZjU/?ref=app
6 Respostas
+ 6
var badgeName = $("#badgeName");
That line references the object, and not the string(value) inside that object.
+ 9
Hi bro I'll start again with the JS and explain you, I don't master jquery.
+ 4
Line 7:
if (badgeName.length < 0)
Should've been
if (badgeName.length > 0)
+ 4
Ipang but it's still not working😕
+ 3
Arturop perfect, now it's working😃
Thankyou soooooooooooooooo much 😄
+ 2
Faxel here is the JS code
https://code.sololearn.com/W40ZdN8ePU3m/?ref=app