Question:
What is the JavaScript word for if something equals nothing?
?
2010-12-26 15:31:50 UTC
Say for instance I have an input textarea and I make a if statement:

if ("specified element id" == "absolutely nothing. The value equals nothing") {
"do this";
}

What is the name for if a value is equal to nothing. I don't believe it is 'undefined' because I tried that. I've tried 'null' as well.
Five answers:
anonymous
2010-12-26 16:00:21 UTC
Ok javascript can be tricky especially across browsers heres what you should try though:



1) status.value==""

2) status.value==null

3) status.value==undefined



With two and three don't put the words in quotes.

NOW I think your code is just completely wrong which is causing this error it should be as follows:



var check = document.getElementById(?).value;

else if (check=="") {

return false;

document.getElementById(?).style.display = "block";

}



You need to grab the particular element (In this case by its ID) to work with it. Replace the ? with the inputs id. Now I've never used "status" in Javascript before so I'm assuming its a custom defined variable you made? - Like the variable check I just made.
?
2016-12-03 17:35:27 UTC
No they do no longer look to be falling back. adult males are! They see a woman getting on greater advantageous than they, they abuse, to stop their very own insecurities. all of us comprehend women human beings are plenty greater able, yet after we teach it the detrimental guy, gets alarmed oh oh. Many hundreds of years in the past, it grow to be women people who controled their relatives, adult males have been merely worker and breeders. in spite of the actuality that they have got been enjoyed, they weren't happy, they suggested, we paintings, we are better than women human beings, why could we do as we are instructed. Supression started out (Godess forgot to furnish women human beings equivalent stenght, therefoe suffered and became a god). women people who chosen to stay in an abusive courting, are to be blamed themselves, because of the fact they gets crushed up or kill with the aid of adult males in the event that they protest againt abuse. who is going to assist them from getting crushed up known, and if she run, who is going to feed and fabric her or supply interest to her or a place to stay! so as that they take it until they might, and then they the two die, waiting, or kill the abuser. adult males have as plenty an onus in making women human beings subservient, reason they are week, and could no longer withstand a huge good guy, so as that they might desire to do what they are instructed to do.else they are going to be crushed, raped, kicked out of the homestead, killed. women human beings get kill until now they are even born, reason a son is greater substantial. it isn't the ladies people who're forgetting their historic previous, they are merely constantly kicked down, every time they attempt to climb up, merely because of the fact the guy is fearful of haveing some woman telling them what to do.
JoelKatz
2010-12-26 15:33:00 UTC
If you mean if the textarea is blank, you want ""
musician1357
2010-12-26 15:39:42 UTC
in your case you might want to add bracket as this:

{cdl class:java.document=true

;return variables

1=x

}



and as such
anonymous
2010-12-26 16:16:36 UTC
if() == "") {

} else {

}


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...