function Person(name,age){
this.name = name;
this.age = age;
this.show = show;
function show(){
document.write("姓名:"+this.name+"<br />");
document.write("年龄:"+this.age+"<br />");
}
这样写有没有问题?
function Person(name,age){
this.name = name;
this.age = age;
this.show = show;
function show(){
document.write("姓名:"+this.name+"<br />");
document.write("年龄:"+this.age+"<br />");
}
这样写有没有问题?