<html>
<script type="text/javascript">
function person(name,sex){
this.name=name;
this.sex=sex;
}
person.prototype.address="湖北襄樊";
person.prototype.speak = function() {
return "我講的是國語";
}
var myself=new person("陳偉","男");
var mix="我的名字叫:"+myself.name;
mix+="/n我的性别是:"+myself.sex;
mix+="/n我的住址是:"+myself.address;
mix+="/n我講的話:"+myself.speak();
alert(mix);
</script>
</html>