加入收藏 | 设为首页 | 会员中心 | 我要投稿 我爱制作网_池州站长网 (https://www.0566zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MySql教程 > 正文

如何制作一个弹出式的调查窗口?

发布时间:2016-11-29 17:34:58 所属栏目:MySql教程 来源:站长网
导读:nbsp; nbsp; lt;% nbsp; nbsp; Dim bSurveynbsp; ' 是否显示调查表 nbsp; nbsp; const bID="1"nbsp; ' 调查表的id nbsp; nbsp; bSurvey=false nbsp; nbsp; ' 检查调查表是否已经显示过. nbsp; nbsp; if instr(request.Cookies("s"),":" bID ":")=0 then nb

nbsp; nbsp; lt;%
nbsp; nbsp; Dim bSurveynbsp;

' 是否显示调查表
nbsp; nbsp; const bID="1"nbsp;

' 调查表的id

nbsp; nbsp; bSurvey=false
nbsp; nbsp; ' 检查调查表是否已经显示过.
nbsp; nbsp; if instr(request.Cookies("s"),":" bID ":")=0 then
nbsp;nbsp; ' 如果调查表没有显示,更新Cookie

nbsp; nbsp; nbsp; response.Cookies("s").expires = DateAdd("d",60,now())

nbsp; nbsp; nbsp; ' 设定Cookie过期时间60天.
nbsp; nbsp; nbsp; response.Cookies("s").path = "/"

nbsp; nbsp; nbsp; ' 设定路径.
nbsp; nbsp; nbsp; response.Cookies("s") = request.Cookies("s") ":" bID ":"

' 写入Cookie.

nbsp; nbsp; nbsp; bSurvey=true
nbsp; nbsp; end if
nbsp; nbsp; %gt;
nbsp;nbsp;nbsp; 知道我们给每个调查表一个id的好处了吧?如果有多个弹出窗口,可以很容易控制弹出顺序的。

再在页尾加入下面的ASP代码,用来判断是否弹出窗口:

lt;% if bSurvey then %gt;

lt;scriptgt;
nbsp; nbsp; nbsp; window.open("/survey/displaysurvey.asp?q="

' 用window.open()来打开新窗口.

bID,"SURVEY","width=350,height=400,top=0,left=0,scrollbars=yes")

lt;/scriptgt;

lt;% end if %gt;

(编辑:我爱制作网_池州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!