求大神解惑
asp吧
全部回复
仅看楼主
level 1
我想在后台添加一个来新数据报警 现在现有功能有自动刷新,我写了一个报警但是不报警,
<%
if request("fresh")="1" then
response.write "<meta http-equiv=""refresh"" content=""8"" />"
end if
flag=0
set rs=server.CreateObject("adodb.recordset")
sql="select * from sound"
rs.open sql,conn,1,1
if not rs.eof then
if rs("sound")=1 and request("fresh")="1" then
response.write "<bgsound src=""images/sound1.mp3"" />"
flag=1
end if
end if
rs.close
if flag=1 then
conn.execute "update sound set sound=0"
end if
%>
代码就是这些 fresh是刷新功能
<input onClick="location='?fresh=1';" type="button" value="刷新数据" <%if request("fresh")=1 then%> style="color:#999"<%end if%> name="action2" class="btn" />
数据库有个sound 在前台表单的地方让他初始为=1
conn.execute "update sound set sound=1" '更新声音设置
但是就是不提示 有知道的大神速度来帮我解答下吧 在线等
2015年07月18日 16点07分 1
level 1
大牛都干啥去了
2015年07月18日 16点07分 2
level 5
注意meta标签位置,检查是否执行
2015年07月22日 14点07分 3
level 12
如果你是后台 建议用 ajax 来实现这样的功能
2015年07月22日 23点07分 4
不懂ajax啊
2015年07月24日 16点07分
1