Recommended: Classic! Write an ASP forum in 5 minutes A friend who studied ASP. . I want to share something good with you. I admire you... Do you think it is difficult to make a forum when you see all kinds of ASP forums on the Internet? In fact, we can complete our own forum with simple ASP statements. I'll teach you below
The following example code is to prevent the use of web pages from refreshing too quickly. If multiple pages are used, it is best to save the <%...%> code as an asp file and use the include file at the front of the required page.
| The following is the quoted content: <% dim RefreshIntervalTime RefreshIntervalTime = 3 'The number of seconds to prevent refreshing, 0 means not to prevent If Not IsEmpty(Session(visit)) and isnumeric(Session(visit)) and int(RefreshIntervalTime) > 0 Then if (timer()-int(Session(visit)))*1000 < RefreshIntervalTime * 1000 then Response.write (<meta http-equiv=refresh content=& RefreshIntervalTime & />) Response.write (Refresh too fast, please wait) Session(visit) = timer() Response.end end if End If Session(visit) = timer() %><!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN> <html> <head> <title>Asp A method to prevent frequent refresh of web pages - CuoXIn.com</title> <meta http-equiv=Content-Type content=text/html; charset=gb2312> <link rel=stylesheet type=text/css href=style.css> <style type=text/css> </style> </head> <body style=background-color:#666666;font-size:36pt;font-family:bold;color:#FFFFF;> Page content, page content </body> </html> |
Share: Detailed explanation of ASP built-in objects Request and Response Request and Response are the two most commonly used built-in objects provided by ASP. The exchange of information that occurs in the request and response between the browser (or other user agent) and the web server can be accessed and managed through two built-in objects in the ASP.