0
Why isn't it working !?
var inm = ["hacker","unknown"]; function validator() { var checkun = document.getElementById("userName"); if(checkun.value == "" ) { alert("You must fill in your User name"); return false;} else if(checkun.value == "
quot; || "*") { alert (' You cannot use " $ " '); return false; } else if(checkun.value == iun[0]) { alert ("The username " + [0] + "is invalid."); return false; } else { alert("success! "); return true; } }5 Respuestas
+ 5
Give me you projects link and i'll fix it for you.
+ 4
somewhere in your code you put a [0] standing alone (replace with inm[0]?)
+ 3
array iun not defined (i think you wanted to write inm)
+ 3
chekun.value == "quot; || "*" should be replaced by chekun.value == ("quot; || "*")
0
I have tried what you explained but still not responding 😯😨