zoukankan      html  css  js  c++  java
  • 图片计数器

    <!--#include file="conn.asp"-->
    <%
    dim action,countnum,upt
        'action=Request.querystring("action")
    if session("action")="" then
       conn.execute("update Counts set counts=counts+1,updatetime='" & now() & "' where Id=1")
       rs.open "select * from Counts where Id=1",conn,1,2
       Countnum=rs("Counts")
       upt=rs("updatetime")
       rs.close()
       session("action")="action"  
    else
       rs.open "select * from Counts where Id=1",conn,1,2
       Countnum=rs("Counts")
       upt=rs("updatetime")
       rs.close()
    end if


    Response.write "var numb='" & Countnum & "';" & vbcrlf
    Response.write "var stringuptime='" & upt & "';" & vbcrlf
    Response.write "var ll=numb.length;" & vbcrlf
    Response.write "var stringimg='';" & vbcrlf
    Response.write "for(i=0;i<ll;i++){" & vbcrlf
    Response.write "stringimg+='<img src=../count/'+numb.substr(i,1)+'.gif>';" & vbcrlf
    Response.write "}" & vbcrlf
    Response.write "document.write ('截止:&nbsp;'+stringuptime+'&nbsp;本站累计访问量:&nbsp;'+stringimg);" & vbcrlf


    方法二:
    a=rs("counts")
    for i=1 to len(rs("counts")
    response.write "<img src=""&../count/"&mid(a,i,1)&".gif>"
    response.write"&nbsp;"
    next


    %>

  • 相关阅读:
    js搜索输入关键词
    pc端,自适应屏幕分辨率
    js获取锚点名称 #
    yourphp读取分类名称{$Categorys[$r[catid]]['catname']}
    收缩菜单 css变样
    ajax成功跨域_自己写的
    json 是个什么东西?
    json_encode详解,转义
    跨域代码 手机号码
    php json_decode
  • 原文地址:https://www.cnblogs.com/itecho/p/1307169.html
Copyright © 2011-2022 走看看