blob: a557cb6b7a836282a8dc7798c8c30f7174d3a0e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<%@LANGUAGE="VBScript"%>
<SCRIPT LANGUAGE="JavaScript" RUNAT="Server">
function JSGreeting()
{
return "Greetings from a JavaScript Function";
}
</SCRIPT>
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Function VBGreeting()
VBGreeting="Greetings from a VBScript Function"
End Function
Function toDollars(x)
toDollars=FormatCurrency(x)
End Function
</SCRIPT>
<%
var a = 2;
var b = 2;
var c = add(a,b)
c += " (Two numbers are added by JavaScript, "
c += "and then formatted into currency by VBScript.)"
function add(x,y)
{
result = x + y;
result = toDollars(result);
return result;
}
Response.Write("<HTML>\r")
Response.Write(JSGreeting() + "<BR>\r")
Response.Write(VBGreeting() + "<BR>\r")
Response.Write(c + " <BR>\r")
Response.Write("</HTML>\r")
%>
|