首先要分清楚funcion与sub的区别:sub:只能是调用的过程 ,不能有返回值;function:可以是过程也可以是返回值。因些调用sub要用 call,而fucntion可以用也可以不用。
写函数时,尽量要定义变量,如有返回值时,可以这样写,少写response.write:
function p()
dim a
a="<table width='286' height='59'><tr><td>gdfdsfdsfd生活</td></tr></table>"
p=a 'response.Write(a)
end function
%>
<%=p() %>