Let's say there is an
<input id="exist" type="text">
and its value is 'something is in here'.
So in the console, I typed several codes.. to check 'input.value' is 'true'...
These are the codes..
var a = document.getElementById='exist';
a.value; // result : 'something is in here'
a.value == 1; // result : false
a.value == true; // result : false
But when input.exist was has empty value, results were like below.
a.value; // result : ''
a.value == 1; // result : false
a.value == true; // result : false
a.value == 0; // result : true
a.value == false; // result : true
Why this happening? How to check about elem.input.value is true?