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>

浙公网安备 33010602011771号