紧急抢救!!!!

wrok53 2007-04-05 03:15:05
先看代码:
1. gobal.asa


<script language="vbscript" runat="server">
sub session_onstart
application("online")=application("online")+1
end sub

sub session_onend
application("online")=application("online")-1
end sub

sub application_onstart
application("online")=0
end sub

sub application_onend
application("online")=0
end sub

</script>



2.online.asp


<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<%
us = application("online")
us = cstr(us)
usbits = len(us)
dim uscoun(20)
dim images(20)
for i = 1 to usbits
uscoun(i) = left(right(us,i),i-(i-1))
next
for i=usbits to 1 step -1
images(i) = "<img src="&"http://localhost/myweb/image"&"/"&uscoun(i)&".gif>"
response.write"document.write("&images(i)&");"
next
%>
</body>
</html>


3 online.html



<html>
<head>
<title>无标题文档</title>

</head>

<body><script language="javascript" src="http:/localhost/myweb/online.asp"></script>
</body>
</html>


哪位仁兄帮我看看,到底哪里出错了,则么效果出不来啊,
...全文
158 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
miefeng 2007-04-05
  • 打赏
  • 举报
回复
online.asp页内容改为
<%
us = application("online")
us = cstr(us)
usbits = len(us)
dim uscoun(20)
dim images(20)
for i = 1 to usbits
uscoun(i) = left(right(us,i),i-(i-1))
next
for i=usbits to 1 step -1
images(i) = "<img src="&"http://localhost/myweb/image"&"/"&uscoun(i)&".gif>"
response.write"document.write('"&images(i)&"');"
next
%>


response.write"document.write('"&images(i)&"');"
要加单引号
miefeng 2007-04-05
  • 打赏
  • 举报
回复
online.aspz里的US读不出值
wangwm 2007-04-05
  • 打赏
  • 举报
回复
<body><iframe src="http:/localhost/myweb/online.asp"></iframe >
</body>
xuyan9927 2007-04-05
  • 打赏
  • 举报
回复
up
cpp2017 2007-04-05
  • 打赏
  • 举报
回复
其实就相对路径就可. 效果出来来,你看看生成的html
wrok53 2007-04-05
  • 打赏
  • 举报
回复
我是想实现图片统计器
miefeng 2007-04-05
  • 打赏
  • 举报
回复
<script language="javascript" src="http:/localhost/myweb/online.asp">
<script language="javascript" src="http://localhost/myweb/online.asp">
少了个斜干吧

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧