<html>
<head>
<title>
测试页面
</title>
</head>
<body>
<Script>
function member(name,sex)
{
this.name = name;
this.sex = sex;
this.display = display;
}
function display()
{
document.write(this.name+"是"+this.sex+"人");
}
var papa = new member("小毛","男");
papa.display();
</Script>
</body>
</html>
-------------------
以上是个例子
<head>
<title>
测试页面
</title>
</head>
<body>
<Script>
function member(name,sex)
{
this.name = name;
this.sex = sex;
this.display = display;
}
function display()
{
document.write(this.name+"是"+this.sex+"人");
}
var papa = new member("小毛","男");
papa.display();
</Script>
</body>
</html>
-------------------
以上是个例子