]
Two types of JavaScript object-oriented Writing methods and differences
http://www.jb51.net/article/13211.htm
JavaScript Object-Oriented Introduction to Condensed Edition
http://www.jb51 .net/article/17541.htm<script>
function user()
{
this.age=21;
this.name="zhangsan";
this.say=function(){
alert("hello");
}
}
var u = new user();
alert(u["age"]);
alert(u.name);
u.say();
</script>