javascript对象使用的代码笔记

</head>
 <script language="javascript">
 function duixiang(name1,age1,class1,sex1,hobby1)
 {
  this.name=name1;
  this.age=age1;
  this.class=class1;
  this.sex=sex1;
  this.hobby=hobby1;
  this.newff=function()
  {
   
  }
  
 }
 var xx=new duixiang();
 xx.name="张三";
 xx.age=20;
 xx.class="外语一般";
 xx.sex="男";
 xx.hobby="打球求";
 document.write(xx.name,xx.age+"岁",xx.class, xx.sex, xx.hobby);
 xx.newff(xx.name,xx.age+"岁",xx.class, xx.sex, xx.hobby);
 
 </script>

posted @ 2013-04-17 17:44  叶凌风纱  阅读(100)  评论(0)    收藏  举报