' This function can be based on the user given the time date, time, minutes, etc., as long as the user given different style parameters can display different styles of time and date.
function Formattime (Testtime,style)
Dim n,y,r,s,f,m
n = year
Website Domain name: www.***.com
Achieve the goal: input www.***.com or ***.com are able to enter the primary domain name www.***.com
System Category: ASP Class website
Prerequisites: The Site Administration panel can set the default home page
The Response.Cookies command is used to create cookies.
Note: The Response.Cookies command must precede the label.
In the following example, we create a cookie named "FirstName" and assign it to "Alex":
The code is as follows
...Keyword=split (Request.Form ("TextField")) ' separates multiple keywords with spaces and saves them in keyword arrayStr= ""For the i=0 to UBound (keyword) ' UBound function to get the maximum subscript value of the array, link multiple keywords
The code is as follows
Copy Code
"Get the address of the visitorIp=request.servervariables ("REMOTE_ADDR")' The allowed IP address segment is 10.0.0.0~10.68.63.255allowip1= "10.0.0.0"Allowip2= "10.68.10.71"Response.writecheckip
ASP tutorial to generate the code instance of verification code
Call Com_creatvalidcode ("Validcode")Sub Com_creatvalidcode (PS tutorial N)' Disable cachingResponse.Expires =-1Response.ExpiresAbsolute = Now ()-1Response.CacheControl = "No-cache"'
Common functions in the development of ASP tutorialsSub Lastnextpage (Pagecount,page,table_style,font_style)' Generate previous page next page linkDim query, A, X, tempAction = "http://" & Request.ServerVariables ("Http_host") &
In the static HTML page to achieve the statistics of the number of browsing, you can do JS to invoke the ASP tutorial file with parameters to achieve, the following is an ASP I wrote the number of static page clicks code.
Dim
Sometimes we need to give users some feedback when writing ASP, this custom return information function is very convenient for everyone to use
' ************************
' subroutine name: Information Prompt window
' function: Informational prompt,
' This sub-page effect support ' pagination, pagination effect: Home prev ... 2 3 4 5 6 7 ... Next last page This paging mode, has the forum style' ID title content status updatetime' 1 T1 C1 1 2010-5-26 21:16:06' 2 T2 C2 1 2010-5-26 21:16:09' 3 t3
Function prev_pic (url,id) sql= "select top 1 * to young Where id>" &id& "ORDER by Id ASC" call opendb () set rs0=conn.execute (SQL) if not rs0.eof Then response.write (" "&Left ( RS0 (4), 5)) else response.write ("No ") end if
'Asp transaction processing.'The test database is SQL server, the server is the local machine, the database name is test, the table name is a, two field IDs (int) primary key identifiers, num (int)Set conn = server. CreateObject ("adodb.
II. Construction1. Build the main formFirst, we need to provide a form that allows users to enter registration information. These are HTML content and put them aside. Let's take a closer look at the specific ASP script for registration.(1) change
To investigate the position of site visitors on specific questions, we can set a voting program on the site. Site visitors directly select the answer, and the program automatically calculates and displays all the answers.The following is a simple
Application of string functions in ASP--------------------------------------------Author: enlightenedSource: Program Design AllianceHttp://www.pgsun.comEMAIL: liuyong8833@sohu.comWelcome to learn and exchange!-----------------------------------------
For example, if the field styledesc is used, the data must be 50 bits and char characters. Can I limit only 50 bits,All characters can be entered. As long as it is char-type, it can be used as long as the database permitsIn this way, securely
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service