最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ASP 编程中 20 个非常有用的例子
时间:2022-06-30 11:57:50 编辑:袖梨 来源:一聚教程网
1.如何用Asp判断你的网站的虚拟物理路径
答:使用Mappath方法
The Physical path to this virtual website is:
2.我如何知道使用者所用的浏览器?
答:使用the Request object方法
strBrowser=Request.ServerVariables("HTTP_USER_AGENT")
If Instr(strBrowser,"MSIE") 0 Then
Response.redirect("ForMSIEOnly.htm")
Else
Response.redirect("ForAll.htm")
End If
3.如何计算每天的平均反复访问人数
答:解决方法
if strdateavgvpd=Int((usercnt)/startdate) % >
显示结果
that is it.this page have been viewed since November 10,1998
4.如何显示随机图象
ppic=12
randomize
p=Int((ppic*rnd)+1)
dpic="graphix/randompics/"&p&".gif"
% >
显示
" >
5.如何回到先前的页面
答:" >preivous page
或用图片如:" >
6.如何确定对方的IP地址
答:
7.如何链结到一副图片上
答:
strimagename="graphix/errors/erroriamge.gif"
response.redirect(strimagename)
% >
8.强迫输入密码对话框
答:把这句话放载页面的开头
response.end
% >
9.如何传递变量从一页到另一页
答:用 HIDDEN 类型来传递变量
答:使用Mappath方法
The Physical path to this virtual website is:
2.我如何知道使用者所用的浏览器?
答:使用the Request object方法
strBrowser=Request.ServerVariables("HTTP_USER_AGENT")
If Instr(strBrowser,"MSIE") 0 Then
Response.redirect("ForMSIEOnly.htm")
Else
Response.redirect("ForAll.htm")
End If
3.如何计算每天的平均反复访问人数
答:解决方法
if strdateavgvpd=Int((usercnt)/startdate) % >
显示结果
that is it.this page have been viewed since November 10,1998
4.如何显示随机图象
ppic=12
randomize
p=Int((ppic*rnd)+1)
dpic="graphix/randompics/"&p&".gif"
% >
显示
" >
5.如何回到先前的页面
答:" >preivous page
或用图片如:" >
6.如何确定对方的IP地址
答:
7.如何链结到一副图片上
答:
strimagename="graphix/errors/erroriamge.gif"
response.redirect(strimagename)
% >
8.强迫输入密码对话框
答:把这句话放载页面的开头
response.end
% >
9.如何传递变量从一页到另一页
答:用 HIDDEN 类型来传递变量
相关文章
- 暗喻幻想:ReFantazio御剑滑行方法 10-29
- 暗喻幻想:ReFantazio黄金虫数量说明 10-29
- 暗喻幻想魔坏之锤获取方法攻略分享 10-29
- 暗喻幻想:ReFantazio难度更改说明 10-29
- 暗喻幻想古井死胡同BOSS打法攻略分享 10-29
- 骗子酒吧骗子骰子游戏规则介绍说明 10-29