主题:如何在.net中关闭窗口
我定义了一个
sub sj(sender as Object,e as EventArgs)
dim sjian as string,sj,sj1,sj2,csj
sj1=""
sj2=cstr(year(now)) & qbling(cstr(month(now)),2) & qbling(cstr(day(now)),2)
sjian=request.Form("cbox")
csj=0
if sjian<>"" then
sjian=sjian & ","
do while instr(sjian,",")>0 and csj<10
sj=mid(sjian,1,instr(sjian,",")-1)
sjian=mid(sjian,instr(sjian,",")+1)
if (int(sj/2))*2=sj then
sj1=sj1 & cstr(sj/2) & "日下午 "
sj2=sj2 & qbling(cstr(sj/2),2) & "0"
else
sj1=sj1 & cstr((sj+1)/2) & "日上午 "
sj2=sj2 & qbling(cstr((sj+1)/2),2) & "1"
end if
csj=csj+1
loop
end if
if sj1="" then
sjxz.text="请选择日期"
else
sjxz.text=sj1
dim cookie as httpcookie
cookie=new httpcookie("sjian")
cookie.values.add("sjian",sj2)
response.appendcookie(cookie)
'在这里写何代码就能关闭本窗口?
end if
end sub
</script>
sub sj(sender as Object,e as EventArgs)
dim sjian as string,sj,sj1,sj2,csj
sj1=""
sj2=cstr(year(now)) & qbling(cstr(month(now)),2) & qbling(cstr(day(now)),2)
sjian=request.Form("cbox")
csj=0
if sjian<>"" then
sjian=sjian & ","
do while instr(sjian,",")>0 and csj<10
sj=mid(sjian,1,instr(sjian,",")-1)
sjian=mid(sjian,instr(sjian,",")+1)
if (int(sj/2))*2=sj then
sj1=sj1 & cstr(sj/2) & "日下午 "
sj2=sj2 & qbling(cstr(sj/2),2) & "0"
else
sj1=sj1 & cstr((sj+1)/2) & "日上午 "
sj2=sj2 & qbling(cstr((sj+1)/2),2) & "1"
end if
csj=csj+1
loop
end if
if sj1="" then
sjxz.text="请选择日期"
else
sjxz.text=sj1
dim cookie as httpcookie
cookie=new httpcookie("sjian")
cookie.values.add("sjian",sj2)
response.appendcookie(cookie)
'在这里写何代码就能关闭本窗口?
end if
end sub
</script>