下面是源码:
<!--#include file="conn/conn.asp" -->
<% if request("radiobutton")<>"" then
select case request("radiobutton")
case "shou" Conn.execute("Update vote set shou=shou+1 where id =1")
case "person" Conn.execute("Update vote set person=person+1 where id =1")
case "inform" Conn.execute("Update vote set inform=inform+1 where id =1")
case "music" Conn.execute("Update vote set music=music+1 where id =1")
case "liter" Conn.execute("Update vote set liter=liter+1 where id =1")
case "board" Conn.execute("Update vote set board=board+1 where id =1")
end select
Response.write("<script>alert(""感谢你的投票!"");</script>")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>::绿叶小屋--网上投票</title>
<style type="text/css">
<!--
body {
font-family: "宋体";
font-size: 12px;
color: #CC3366;
text-decoration: none;
}
.td {
font-family: "宋体";
font-size: 14px;
font-weight: bold;
color: #CC3366;
text-decoration: none;
border: 5px dotted #FF6699;
}
-->
</style>
</head>
<body>
<table width="330" border="0" align="center" cellpadding="0" cellspacing="3" class="td">
<% Set conn=Server.Createobject("ADODB.CONNECTION")
set rs=conn.execute("select * from vote ")
if not rs.bof and rs.eof then
%>
<tr>
<td width="73">首页</td>
<td width="200"><hr align="left" width="<%= rs("shou") %>"></td>
<td width="50"><%= rs("shou") %>票</td>
</tr>
<tr>
<td width="73">个人栏</td>
<td width="200"><hr align="left" width="<%= rs("person") %>"></td>
<td width="50" ><%= rs("person") %>票</td>
</tr>
<tr>
<td width="73">资讯</td>
<td width="200"><hr align="left" width="<%= rs("inform") %>"></td>
<td width="50"><%= rs("inform") %>票</td>
</tr>
<tr>
<td width="73">音乐</td>
<td width="200"><hr align="left" width="<%= rs("music") %>"></td>
<td width="50"><%= rs("music") %>票</td>
</tr>
<tr>
<td width="73">文学</td>
<td width="200"><hr align="left" width="<%= rs("liter") %>"></td>
<td width="50"><%= rs("liter") %>票</td>
</tr>
<tr>
<td width="73">留言</td>
<td width="200"><hr align="left" width="<%= rs("board") %>"></td>
<td width="50"><%= rs("board") %>票</td>
</tr>
</table>
<% end if
rs.close:set rs=nothing %>
</body>
</html>
可以写进数据库.就是不能输出.帮帮偶