jsサイクル

465 ワード

<script type="text/javascript">
  function person(name,sex,age)
  {
      this.name=name;
      this.sex=sex;
      this.age=age;  
  }

  var person1=new person("  "," ","20");
  //  person       
  for(var e in person1)
  {
      alert("key:"+e+"
"+"value:"+person1[e]); } </script >