⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 submit.asp

📁 windowsCE 串口
💻 ASP
字号:
<script Language="VBScript" RunAt="Server">
</script>
<HTML>
<HEAD><title>提交投票结果</title>
</HEAD>
<body bgcolor="#F2EADD">
<p align="center"> <font face="隶书" size="+3"> ☆ 感谢您参加本次网上投票调查!☆</font></p>
<hr>
<table border=1 cellspacing=1 cellpadding=1 width='85%'
  bordercolorlight="#CCCC33" align="center">
  <tr align=center bgcolor="#F8D9AB"> 
    <td colspan="3">
<font face="楷体_GB2312" size="+3"><b><font size="+2">下表是目前的投票结果</font></b></font></td>
  </tr>
  <tr align=center> 
    <td width="38%">
      <font size="+2" face="楷体_GB2312">所选的操作系统</font></td>
    <td width="37%"><font size="+2" face="楷体_GB2312">目前得票数</font></td>
    <td width="25%"><font size="+2" face="楷体_GB2312">得票率</font></td>
  </tr>
  <%
Dim selected, nowcnt,nowtime
ReDim percent(4)   
ReDim name(5)  
ReDim count(5)  
On Error Resume Next
Application.Lock
selected = CInt(Request.Form("os"))  
set fso = CreateObject("Scripting.FileSystemObject")
filepath=server.MapPath("result.txt") 
set getcnt = fso.OpenTextFile(filepath,1,0,0)
i = 0
While Not getcnt.AtEndOfStream
  temp = getcnt.ReadLine
  name(i) = Left(RTrim(temp), 7)
  count(i) = Right(RTrim(temp), 7)
  If i = selected Then
    j = CDbl(count(i)) + 1
    count(i) = Right(Space(8) & Trim(CStr(j)), 8)
  End If
  i = i + 1
 WEnd
getcnt.Close
set writecnt = fso.CreateTextFile(filepath,-1,0)
nowcnt = 0
For j = 0 to 4
  nowcnt = nowcnt + CDbl(count(j))
  writecnt.WriteLine name(j) & count(j)
Next
nowtime=now()
count(5)=nowtime
writecnt.WriteLine name(5) & count(5)
writecnt.Close
Application .Unlock
For j = 0 To 4
   percent(j) = CDbl(count(j)) /CDbl(nowcnt)
%> 
<tr align=center> 
  <td width="38%">
    <font color='#007f00'size=+2> <%Response.Write Trim(name(j))%></font></td>
  <td width="37%">
    <font color='#ff0000'size=+2> 
    <% Response.Write FormatNumber(count(j), 0)%> </font></td>
  <td width="25%">
    <font color='#AD5A5A'size=+2> 
    <%Response.Write FormatPercent(percent(j))%> </font></td>
  </tr>
  <%Next%> 
  <tr align=center> 
    <td colspan="3"> 
<font color='#FF33FF'size=+2>     
<%
      Response.Write( "共 计:")
      Response.Write FormatNumber(nowcnt, 0)&"张选票"
%> 
</font>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -