日期:2014-05-16 浏览次数:21015 次
<%
If request("tm")="ags" Then
Response.CacheControl = "no-cache"
conn.execute("update qd_list set d=1 where id="&request("id"))
Response.Write("document.getElementById('img"&request("id")&"').className='bg_1';")
'response.Write("alert('感谢您的参与');window.location.href='index.asp';")
Response.end
End if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<script language="javascript" scr="" id="ags"></script>
<script language="javascript">
function c_c(c_id) {
document.getElementById('ags').src='?tm=ags&id='+c_id
}
</script>
<style type="text/css">
.bg_0 {background:#CCC}
.bg_1 {background:#09F}
</style>
</head>
<body bgcolor="#F6F6F6" style="margin:0PX">
<p>
<%
set rs= Server.CreateObject("adodb.recordset")
sql="select * from qd_list"
rs.open sql,conn,1,1
do while not rs.eof
%>
<div class="<%if rs("d")=1 then%>bg_1<%else%>bg_0<%end if%>" style="width:50PX; height:50PX; text-align:center; line-height:50PX; display:block; margin:10PX; float:left" id="img<%=rs("id")%>" onclick="c_c('<%=rs("id")%>')"><%=rs("img")%></div>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>
function c_c(c_id) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = '?tm=ags&id=' + c_id
document.getElementsByTagName('head')[0].appendChild(script);
}