JS代码:
var person = new Object();
person.name = "huangjiangmiao";
person.age = 6;
person.sayhello = function () { alert("hello ,i am huangjianmiao."); }
person.sayhello();
for (var e in penson) {
alert(e);
}
运行结束显示结果后转到person.sayhello();这一行Person未定义,明明定义了啊! |
|