- 论坛徽章:
- 0
|
今天安装了一下ActivePerl , 试了下里面自带的例子.
结果,
http://localhost/myweb/plmouse.htm 这样的地址, PerlScript的内容能够起作用, 如图1.jpg
http:// 主机ip(如172.20.1.20) /myweb/plmouse.htm 这样的地址, PerlScript的内容却完全不能够起作用, 如图2.jpg
我不知道为什么会这样? 望赐教, 谢谢!
说明 1, myweb是目录
2, plmouse.htm 是写有perlscript代码的脚本, 代码如下
<HTML>
<!-- saved from url=(0017)http://localhost/ -->
<HEAD><TITLE> erlScript sample: Mouse tracking</TITLE>
<link rel="stylesheet" type="text/css" href="../HTML/Active.css">
</HEAD>
<!--
ActiveState PerlScript sample
PerlScript: The easiest, most powerful way to program custom web solutions.
-->
<BODY>
<TABLE CELLPADDING=0 BORDER=3 CELLSPACING=0>
<TR VALIGN=TOP ><TD>
<A HREF="index.htm" NAME="Image"><IMG SRC=" SBWlogo.gif" WIDTH=400 HEIGHT=48 ALT="The power of PerlScript!" BORDER=5></A>< >
</TD></TR>
<FORM method=" OST" NAME="MyForm1">
<TR VALIGN=MIDDLE><TD VALIGN=MIDDLE ALIGN=CENTER>
<INPUT TYPE="text" NAME="TxtLinkDescription" SIZE=50>
</TD></TR>
</TABLE>
</FORM>
<HR>
< >
< > Move your mouse over the PerlScript logo to see Image_MouseMove event parameters.
<SCRIPT language=" erlScript">
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>
< >
<!-- Horizontal line -->
<HR>
</BODY>
</HTML> |
-
1.jpg
(25.23 KB, 下载次数: 25)
-
2.jpg
(24.26 KB, 下载次数: 24)
|