日期:2014-05-16 浏览次数:20373 次
<script type="text/javascript"> var testFun = function (){ var name4 = '4545'; alert(name4); return '测试成功!'; } var obj = { name:"李华", age :34, fun : testFun/*, toString:function(){ return this.name; }*/ } obj.toString=function(){ return this.name; } alert(obj); </script>