lets say i have two objects with the same properties and rge same values
:
var o1={element:one , type:'keyup',co de:82,action:se tToRed};
var o2={element:one , type:'keyup',co de:82,action:se tToRed};
the variable "one" being a DIV Element and "setToRed" a function.
doing alert(o1===o2) gave me false.
does it means the comparaison operates over references not "values" ???
I need to have a proper comparator, saying "eql" for Objects containing
any king of values :
Number, string, date, object...
how could i know an Object is of type <tag nameElement ?
only by testing obj.nodeName ?
--
Une Bévue
:
var o1={element:one , type:'keyup',co de:82,action:se tToRed};
var o2={element:one , type:'keyup',co de:82,action:se tToRed};
the variable "one" being a DIV Element and "setToRed" a function.
doing alert(o1===o2) gave me false.
does it means the comparaison operates over references not "values" ???
I need to have a proper comparator, saying "eql" for Objects containing
any king of values :
Number, string, date, object...
how could i know an Object is of type <tag nameElement ?
only by testing obj.nodeName ?
--
Une Bévue
Comment