找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 6088|回复: 1

Global code for Internet Explorer

[复制链接]

96

主题

158

回帖

4

精华

核心会员

积分
6513
发表于 2012-6-6 07:56:57 | 显示全部楼层 |阅读模式
<SCRIPT LANGUAGE="VBScript">
Option Explicit

Dim x
x = 10

Function Increment(lVar)
   lVar = lVar + 1
   Increment = lVar
End Function

Function Decrement(lVar)
   lVar = lVar - 1
   Decrement = lVar
End Function

</SCRIPT>
<CENTER><H2>Welcome to our web page!</H2></CENTER>
<SCRIPT LANGUAGE="VBScript">

Document.Write "The current value of x is " & x & "<BR>"

Dim y
y = 20
If x = 0 Then
   Document.Write "Initializing <I>x</I> in the second script block" & "<BR>"
   x = 10
End If

Document.Write "Value returned by Increment: " & Increment(x) & "<BR>"
Document.Write "Value returned by Increment: " & Increment(x) & "<BR>"
Document.Write "Value returned by Decrement: " & Decrement(x) & "<BR>"
Document.Write "The value of x is now " & x & "<BR>"
Document.Write "The value of y is " & y & "<BR>"

</SCRIPT>

7

主题

414

回帖

1

精华

铂金会员

积分
2173
发表于 2013-4-10 14:05:47 | 显示全部楼层
有分IE版本嗎
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

快速回复 返回顶部 返回列表