<script>
function people(name,age)
{
this._name=name;
this._age=age;
}
son=new people("zhu",10);
document.write("name:"+son._name+",age:"+son._age);
//2
hello=new Object();
hello.name="hell0";
hello.age=10;
document.write("name:"+hello.name+",age:"+hello.age);
//String 对象
var str="a good people";
document.write("length:",str.length);
document.write(str.indexof("good"));//返回指定客串的索引,找不到返回-1;
document.write(str.match("good"));//不存在指定内容,返回 null
document.write(str.replace("good","well"));
document.write(str.toUpperCase());
var s=str.split(" ");
document.write(s[1]);
</script>