用参数传递解决window.open的session变量有时候丢掉的问题

None.gif
None.gifopen函数,放在
< head > </ head > 之间
None.gif
None.gif
< script language = " javascript " >
None.gif
<!--  
None.gif 
function  openwindow(par,hang,lie,mterm,mweek,mlabname)
None.gif {
None.gif    
var  pp,bhang,blie,req_week,req_term;
None.gif pp
= par;
None.gif bhang
= hang;
None.gif blie
= lie;
None.gif req_week
= mweek;
None.gif req_term
= mterm;
None.gif req_labname
= mlabname; window.open('iptinfo.asp ? qinqiu = ' + pp + ' & qhang = ' + bhang + ' & qlie = ' + blie + ' & req_week = ' + req_week + ' & req_term = ' + req_term + ' & req_labname = ' + req_labname,'请输入相关信息','height = 200 , width = 320 , top = 0 , left = 0 , toolbar = no, menubar = no, scrollbars = no, resizable = no,location = no, status = no')
None.gif    }
None.gif
-->
None.gif
</ script >  
None.gif
None.gif
None.gif函数的调用,放在你想到的地方,我这儿是用onclick触发调用
None.gif
None.gif
< a href = # onclick = openwindow(' <%= session( " teachername " ) %> ',' <%= (bhang + 2 ) / 4 %> ',' <%= blie - 1 %> ',' <%= lnd_term %> ',' <%= lnd_week %> ',' <%= sek_labname %> ') > 预约 </ a >
None.gif
None.gif

那么在iptinfo.asp里面就可以用request(“qinqiu“)获得session变量的值,其它参数一样,可由request得到,不过据说在参数传递时url不能超过255,我好像超过了也没出错提示:(

转载于:https://www.cnblogs.com/kikee/archive/2005/01/27/98063.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值