In my application, I am taking a value for username. If that value is 0, then I have to run some code. But how should I write the if block?
var userName=document.getElementById("member").value;
The above statement will return 0 (zero). Can anybody write the if statement for me? Thank you in advance.This is the entire code
var userName=document.getElementById("member").value;
var password=document.getElementById("password").value;
if(userName==="0"){
var div4 = document.getElementById("errorMessage");
var text1 = "insert userName.";
div4.style.display = "block";
div4.style.color = "red";
div4.style.fontSize = "65%";
div4.innerHTML = text1;