<html >
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
/*
person class
*/
function Person(name){
= name;
}
Person.prototype ={
getName : function(){
return ;
},
setName : function(name){
= name;
},
showName : function(){
alert();
}
}
var xm = new Person("xiaoming");
xm.showName();
xm.setName("zhangsan");
xm.showName();
/*
extend class(dynamic)
*/
Person.prototype.getGreeting = function(){
return "hello," + ;
}
alert(xm.getGreeting());
/*
*/
</script>
</body>
</html>