关于asp函数中如何传递自定义类型的参数

来源:百度知道 编辑:UC知道 时间:2024/06/15 19:17:20
如下:
class person
public age
public name
end class
这是一个定义人的类

这个函数需要传递的参数p类型为person,在asp中应该如何写
function GetPerson(p)
response.Write(p.name)
end function

-----------------------
高分求解,谢谢各位

<%
class Person
dim age
dim name
public sub setName(str)
name = str
end sub
end class

function GetPerson(p)
GetPerson = p.name
end function

set person1 = new Person
person1.setName("a")
Response.Write(GetPerson(person1))
%>
测试正确.

dim person=new person