老大,增加了上述内容后反倒弹不出窗口了,似乎测试中,增加了end if 时,好像语句不再往下执行,就终止了。另外还存在这么个问题,如果查询结果为空的时候,提示错误,提示信息和上边说过的一样。这是我修改过的示例:
set rs=Server.CreateObject("adodb.recordset")
sql= "SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='每次登陆提醒' "
rs.open sql,conn,1,1
if not rs.eof then
response.write "<script language='javascript'>"
response.write "parent.getMsg6();"
response.write "</script>"
if rs.eof and rs.bof
end if
set rs1=Server.CreateObject("adodb.recordset")
sql1= "SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='每周定期提醒' "
rs1.open sql1,conn,1,1
if not rs1.eof then
response.write "<script language='javascript'>"
response.write "parent.getMsg2();"
response.write "</script>"
if rs1.eof and rs1.bof
end if 请继续指正,谢谢!
set rs=Server.CreateObject("adodb.recordset")
sql= "SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='每次登陆提醒' "
rs.open sql,conn,1,1
if not rs.eof then
response.write "<script language='javascript'>"
response.write "parent.getMsg6();"
response.write "</script>"
if rs.eof and rs.bof
end if
set rs1=Server.CreateObject("adodb.recordset")
sql1= "SELECT * FROM alertdata WHERE txzt='需要提醒' and syname='"&session("UserName")&"' and szlx='每周定期提醒' "
rs1.open sql1,conn,1,1
if not rs1.eof then
response.write "<script language='javascript'>"
response.write "parent.getMsg2();"
response.write "</script>"
if rs1.eof and rs1.bof
end if 请继续指正,谢谢!