<script language="javascript" type="text/javascript">
function Cat(){
}
var cat1 = new Cat();//创建类实例
cat1.name = "小狗";
cat1.age = 4;
cat1.color="白色";
document.write(cat1.name);
document.writeln(cat1.constructor);//实例化后对象,是对象
document.writeln(typeof(cat1)+"<hr />");
document.writeln(Cat.constructor);//原型对象本身也是对象
document.writeln(typeof Cat+"<hr />");
var b="hello";//字符串也是对象
document.writeln(b.constructor);//输出它的构造函数
document.writeln(typeof b+"<hr />");
var c=123;//数值也是对象
document.writeln(c.constructor);
document.writeln(typeof c+"<hr />");
</script>