Kamis, 01 Januari 2026

VBScript

 <center>

<p>

<input type="BUTTON" value="Click me" name="BtnHello">



<script language="VBScript">

<!--

Sub BtnHello_OnClick

MsgBox "Hello World!", 0, "My first active document"

End Sub

-->

</script>

============================

<SCRIPT LANGUAGE="VBScript">
	' This line executes when the script tag is parsed.
	Call PrintWelcome

	Sub PrintWelcome
		Dim h

		h = Hour(Now)
		If h < 12 then 
			Document.Write "Good morning!  "
		ElseIf h < 17 then 
			Document.Write "Good afternoon!  "
		Else 
			Document.Write "Good evening!  "
		End If
		Document.Write "Welcome to the world of VBScript.  "
		Document.Write "Just in case you were wondering, it's "
		Document.Write Time() & " on " & Date() & "."
	End Sub
</SCRIPT>
====================

 

 <div id="idTransDiv" style="position:relative; top:0; left:0; height:0; width:69;

  filter:revealTrans(duration=3.0, transition=0);">

  <h4 id="idHead" style="position:relative; visibility:visible; margin-


bottom:0;">Samples:&nbsp;Mouse&nbsp;Tracking</h4>

</div>

<p>


<font size="5">

<table border="0"><tr valign="MIDDLE"><td>

<a id="Image"> <img 


src="/web/20010616083652im_/http://msdn.microsoft.com/scripting/vbscript/sampl


es/mouset/msn-home.jpg" alt="" width="590" height="224" 


border="0"></a></td></tr>

<tr><td>&nbsp;</td></tr>

<tr valign="MIDDLE"><td valign="MIDDLE" align="CENTER"><font 


size="5"><input type="text" name="TxtLinkDescription" 


size="50"></font></td></tr></table>

</font>


<script language="VBScript">

<!-- 

Dim mX, mY


If ie4= true then

sub Image_onMouseMove()

y = window.event.offsetY

mY = y

x = window.event.offsetX

mX = x


If InRect(x, y,  5, 30, 120, 85) Then 

Call DescribeLink("The Microsoft Product 


Catalog")


ElseIf InRect(x, y,  5, 95, 120, 135) then 

Call DescribeLink("Microsoft's product support 


options")


ElseIf InRect(x, y,  5, 150, 120, 190) then 

Call DescribeLink("Download free Microsoft 


software")

ElseIf InRect(x, y,  470, 30, 570, 47) then 

Call DescribeLink("An Internet tutorial")

ElseIf InRect(x, y,  470, 70, 570, 87) then 

Call DescribeLink("Use these search services to 


find anything on the Internet")

ElseIf InRect(x, y,  470, 105, 570, 122) then 

Call DescribeLink("We've put helpful and handy 


web resources at your fingertips")

ElseIf InRect(x, y,  470, 140, 570, 157) then 

Call DescribeLink("Take a look at this week's 


picks")

ElseIf InRect(x, y,  470, 175, 570, 192) then 

Call DescribeLink("About the Microsoft Network")


Else 

DescribeLink ""

End If

End sub


Else 


' Remember the last location clicked.


Sub Image_MouseMove(s, b, x, y)

mX = x

mY = y

If InRect(x, y,  5, 30, 120, 85) Then 

Call DescribeLink("The Microsoft Product 


Catalog")


ElseIf InRect(x, y,  5, 95, 120, 135) then 

Call DescribeLink("Microsoft's product support 


options")


ElseIf InRect(x, y,  5, 150, 120, 190) then 

Call DescribeLink("Download free Microsoft 


software")

ElseIf InRect(x, y,  470, 30, 570, 47) then 

Call DescribeLink("An Internet tutorial")

ElseIf InRect(x, y,  470, 70, 570, 87) then 

Call DescribeLink("Use these search services to 


find anything on the Internet")

ElseIf InRect(x, y,  470, 105, 570, 122) then 

Call DescribeLink("We've put helpful and handy 


web resources at your fingertips")

ElseIf InRect(x, y,  470, 140, 570, 157) then 

Call DescribeLink("Take a look at this week's 


picks")

ElseIf InRect(x, y,  470, 175, 570, 192) then 

Call DescribeLink("About the Microsoft Network")


Else 

DescribeLink ""

End If

End Sub



End If



Sub Image_OnClick()

If InRect(mX, mY,  5, 30, 120, 85) Then 

location.Href = 


"https://web.archive.org/web/20010616083652/http://www.microsoft.com/products/


default.asp"

ElseIf InRect(mX, mY,  5, 95, 120, 135) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.microsoft.com/support/"

ElseIf InRect(mX, mY,  5, 150, 120, 190) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.microsoft.com/products/


default.asp"

ElseIf InRect(mX, mY,  470, 30, 570, 47) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.msn.com/tutorial/default.


html"

ElseIf InRect(mX, mY,  470, 70, 570, 87) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.all4one.com"

ElseIf InRect(mX, mY,  470, 105, 570, 122) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.msn.com/"

ElseIf InRect(mX, mY,  470, 140, 570, 157) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.msn.com/"

ElseIf InRect(mX, mY,  470, 175, 570, 192) then 

location.href = 


"https://web.archive.org/web/20010616083652/http://www.msn.com/"

End If

End Sub


Function InRect(x, y, Rect_x1, Rect_y1, Rect_x2, Rect_y2)

InRect =  x > Rect_x1 And x < Rect_x2 And y > Rect_y1 And y 


< Rect_y2

End Function

Sub DescribeLink(Text)

TxtLinkDescription.Value = Text

End Sub

-->

</script>


<p>

<font size="2">

A brief <a 


href="/web/20010616083652/http://msdn.microsoft.com/scripting/vbscript/samples/


mouset/explain.htm">explanation</a> is available.  

If this sample doesn't work, download <a 


href="/web/20010616083652/http://msdn.microsoft.com/isapi/gomscom.asp?


Target=/ie/">Internet Explorer 5.0</a> now.<p>


</font>



<br><p>

<font face="verdana, arial, helvetica" size="1" align="RIGHT" color="#808080">

<i>Last updated: <!--$$JustDate:-->  1/04/00 <!-- $--></i>

</font></p>

===============================


Tidak ada komentar: