Friday, February 21, 2014

Objects created of same control(element) are not same

Html control

<input id="test" type="text" />

Script starts from here

var obj1=$("#test");
var obj2=$("#test");
console.log(obj1==obj2);
if(obj1==obj2){ //this will be always false
    console.log(true);
}

No comments:

Post a Comment