home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_56eeca5b36d5bbe2d453753de57e0ccc
< prev
next >
Wrap
Text File
|
2000-03-15
|
2KB
|
67 lines
<HTML>
<HEAD><TITLE>PerlScript sample: Mouse tracking</TITLE></HEAD>
<!--
ActiveState PerlScript sample
PerlScript: The easiest, most powerful way to program custom web solutions.
-->
<BODY BGCOLOR="#FFFFFF" TOPMARGIN=8>
<FORM method="POST" NAME="MyForm1">
<TABLE CELLPADDING=0 BORDER=3 CELLSPACING=0>
<TR VALIGN=TOP ><TD>
<A HREF="index.htm" NAME="Image"><IMG SRC="PSBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="The power of PerlScript!" BORDER=5></A><P>
</TD></TR>
<TR VALIGN=MIDDLE><TD VALIGN=MIDDLE ALIGN=CENTER><FONT SIZE=5>
<INPUT TYPE="text" NAME="TxtLinkDescription" SIZE=50></FONT>
</TD></TR>
</TABLE>
</FORM>
<HR>
<P>
<FONT SIZE=5>
<P> Move your mouse over the PerlScript logo to see Image_MouseMove event parameters.
</FONT>
<SCRIPT language="PerlScript">
sub Image_MouseMove {
my ($x,$y, $s, $b) = @_;
$window->document->MyForm1->TxtLinkDescription->{'Value'} = "MouseMove s:$s b:$b x:$x y:$y";
}
sub Image_mousemove {
Image_MouseMove(@_);
}
sub Image_onmousemove {
my $e = $window->event;
my ($x,$y, $s, $b) = ($e->X, $e->Y, $e->OffsetX, $e->OffsetY);
$window->document->MyForm1->TxtLinkDescription->{'Value'}
= "MouseMove [X=$x Y=$y relX=$s relY=$b";
}
</SCRIPT>
<P>
<!-- Horizontal line -->
<HR>
<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=0 width=600>
<TR VALIGN=TOP>
<TD ALIGN=RIGHT>
<FONT FACE="Arial, Helvetica" SIZE="1">
<B>Best experienced with<BR>
<A HREF="http://www.microsoft.com/ie/" TARGET="_top">
<img src="ie_animated.gif" width="88" height="31" border="0" alt="Microsoft Internet Explorer" vspace="5"></a>
<BR>Click here to start.</B>
</FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>