咖啡虫之家

我的日历
友情链接
访问计数
最新评论
获取RSS
我的 Blog:
kafeichong 最新的 20 条日志
[javascript]
[asp]
[常识]
[SQL]
[文学]
[Dreamweaver]
[网页设计]
[flash]
[片言碎语]
[php]
[web standard]
全站 Blog:
全站最新的 20 条日志

我的asp学习笔记-Procedures

Author:咖啡虫 PublishTime:2004-6-15
1。Call a procedure using VBScript in ASP
<html>

<head>
<%
sub vbproc(num1,num2)
response.write(num1*num2)
end sub
%>
</head>

<body>
You can call a procedure like this:
Result: <%call vbproc(3,4)%>
Or, like this:
Result: <%vbproc 3,4%>
</body>
</html>
结果为:You can call a procedure like this: 
Result: 12 
Or, like this: 
Result: 12 
2。Call a procedure using javascript in ASP
<%@ language="&#106avascript" %>
<html>
<head>
<%
function jsproc(num1,num2)
{
Response.Write(num1*num2)
}
%>
</head>
<body>

Result: <%jsproc(3,4)%>
</body>
</html>
结果为;Result: 12 

3。Call a javascript procedure and a VBScript procedure using VBScript in ASP 
<html>
<head>
<%
sub vbproc(num1,num2)
Response.Write(num1*num2)
end sub
%>
<script  language="javascript" runat="server">
function jsproc(num1,num2)
{
Response.Write(num1*num2)
}
</script>
</head>

<body>
Result: <%call vbproc(3,4)%>
Result: <%call jsproc(3,4)%>
</body>
</html>
结果为:Result: 12

Result: 12
分类于:asp

 

Powered by 5DBlog.com