2个obj值一样,为什么不能判断相等?
2个obj值一样,为什么不能判断相等?
<script type="text/javascript">
	obj1={
		name:"hello",
		age:"20"
	}
	obj2={
		name:"hello",
		age:"20"
	}
	if(obj1==obj2){
		alert("yes")
	}else{
		alert("no");
	}
	// 为什么测试结果是no?
</script>
------解决方案--------------------http://www.cnblogs.com/yuanxiaoping_21cn_com/archive/2009/12/08/1619321.html
试试这个方法
------解决方案--------------------http://www.9php.com/FAQ/cxsjl/webkf/2010/12/2201838161859.html
看看这个。