如何使用ASP在自己的网站建立投票机制(二),如何使用ASP在自己的网站建立投票机制(二)
【 tulaoshi.com - ASP 】
Batman 翻译整理
4、文件default.asp
<%
ID = Request("ID")
If ID = "" Then
ID = 30
End If
Title = "Polls (Create your own poll)"
%
<html
<head<link rel="STYLESHEET" type="text/css" href="style.css"
<titleASP Polls
<script language="JavaScript"
function gatherForm(form){
if(form.Mode[0].checked){
form.submit();
}else{
form.action="collect.asp";
form.submit();
}
}
<body
<div align="left"<img src="/attachment/portal/jcwcj/2005-12/10/05121001023194767.gif"" width="231" height="90"<brAnother joint product from <a href="http://www.ncws.com/tippycow"Tipped Cow Development<br<br
<table width="100%" cellspacing="0" cellpadding="2"
<tr
<td align="left" width="25%" valign="top" class="bold"
<form action="default.asp"
<table width="100" border="1" bordercolor=#ccccff
<tr
<td
<table border=0 cellspacing=0 cellpadding=5 bgcolor=#4f4f4f<tr
<td colspan=3 bgcolor=#000000 align=center class="bold2"Select A Poll <td colspan=3 bgcolor=#000000 align=center
<select name="ID" onChange="gatherForm(this.form)" class="input"
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open Application("ASPPollDSN")
sql = "select * from Poll"
Set rs = conn.Execute(sql)
Do While Not rs.EOF
%
<option value="<%=rs("ID")%"<%=rs("PollName")%
<%
rs.MoveNext
Loop
%
<tr
<td colspan=3 align=right bgcolor=#FFFFFF class="bold"
Vote In Poll:<input type="radio" name="Mode" value="Vote" CHECKED<br
View Results:<input type="radio" name="Mode" value="View"
</td<
来源:http://www.tulaoshi.com/n/20160129/1503603.html
看过《如何使用ASP在自己的网站建立投票机制(二)》的人还看了以下文章 更多>>