Class cls_fun
private x,y,ii
==============================
function name: Alertinfo
use: Error display function
parameter number: Error hint content infostr, turn page Gourl
============= =================
public Function alertinfo (infostr,gourl)
If gourl= "1" Then
Response.Write "<script>alert (' & Infostr &"); location.href= ' Javascript:history.go ( -1) '; </ Script> "
Else
Response.Write" <script>alert (' & Infostr & '); Location.href= ' "& Gourl &" ';</script> "
end If
Response.End ()
end Function
==============================
function name: HTMLEncode
Make Using: Character conversion function
parameter number: text fstring
==============================
to convert
==============================
Function Name: Alertnum
Role: To determine whether a number (validation characters, not a number of prompts)
Parameters: Text CHECKSTR to be judged, error hint ERRSTR
==============================
Public Function Alertnum (CHECKSTR,ERRSTR)
If not IsNumeric (CHECKSTR) or checkstr= "" Then
Call Alertinfo (Errstr, "1")
End If
End Function
==============================
Function Name: alertstring
Role: Determine string length
Parameters
Text CHECKSTR to be judged
Limited to the shortest shortlen
Limit the longest Longlen
Authentication Type Checktype (2-head limit, 1 shortest limit, 2 maximum)
short hint longstr
long hint longstr,
================ ==============
public Function alertstring (checkstr,shortlen,longlen,checktype,shorterr,longerr)
If (checktype=0 Or checktype=1) and Stringlength (CHECKSTR) <shortlen Then
call Alertinfo ( Shortstr, "1")
End If
if (checktype=0 Or checktype=2) and Stringlength (CHECKSTR) >longlen Then
Call Alertinfo (Longstr, "1")
End If
end Function
================ ==============
Function name: Alertnum
for use: To determine whether a number (a validation character, not a number of prompts)
parameter Number: Text CHECKSTR to be judged, error prompts ERRSTR
==============================
public Function Shownum (CHECKSTR,ERRSTR)
If not IsNumeric (CHECKSTR) or checkstr= "" Then
Response.Write ( errstr& "| | | | |")
pageerr=1
End If
end Function
==============================
function name: showstring
for : judging string length
Parameters Number:
The text to be judged Checkstr
Limited to the shortest Shortlen
Limited Longlen
Authentication type Checktype (2-head limit, 1 minimum, 2 maximum limit)
short hint longstr
long hint longstr,
========================= =====
public Function showstring (checkstr,shortlen,longlen,checktype,shorterr,longerr)
If ( Checktype=0 Or checktype=1) and Stringlength (CHECKSTR) <shortlen Then
Response.Write (shorterr& "|||||")
pageerr=1
End If
if (checktype=0 Or checktype=2) and Stringlength (CHECKSTR) >lon GLen Then
Response.Write (longerr& "| | | | |")
pageerr=1
End If
end Function
a
======================== = = = = = = = = = = = = =
Function name: Beselect
for use: Judge Select option Select
parameter number: Select1, Select2
==============================
public Function beselect (select1,select2)
If select1= Select2 Then
beselect= "selected= ' selected '"
end If
end Function
&nb sp;==============================
Function name: Becheck
for use: Check option select
parameter Number: Check1,check2
==============================
public Function Becheck ( Check1,check2)
If check1=check2 Then
becheck= "checked= ' checked '"
end If
; End Function