?? config.asp
字號:
<%
'***********定義環境變量***********
dim cookieName,sessionLife
'前臺用戶登陸后的cookie群組名
cookieName="Cwj"
'后臺登陸Session生命期
sessionLife=40
'***************************子程序*********************************
'************************
'子程序名:信息提示窗口
'功能:信息提示,并作返回或者轉向
'參數:
'str 提示字符串
'stype 處理類型:Back 返回 GoUrl 轉向 Close 關閉
'url 轉向方向
'************************
Sub MsgBox(str,stype,url)
response.write "<script language=javascript>"
response.write "alert('"&str&"');"
select case stype
case "Back"
response.write "history.go(-1);"
case "GoUrl"
response.write "window.location='"&url&"'"
case "Close"
response.write "window.close()"
end select
response.write "</script>"
End Sub
'************************
'子程序名:格式化輸入字符串
'功能:消除HTML標記
'參數:
'fString 要處理的字符串
'************************
function HTMLEncode2(fString)
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
fString = Replace(fString, CHR(10), "<BR>")
'fString = Replace(fString, CHR(32), " ")
HTMLEncode2 = fString
end function
function HTMLDecode(fString)
fString = Replace(fString, "",CHR(13))
fString = Replace(fString, "</P><P>",CHR(10) & CHR(10))
fString = Replace(fString, "<BR>",CHR(10))
'fString = Replace(fString, " "," ")
HTMLDecode = fString
end function
'************************
'子程序名:測試字符串長度
'功能:返回字符串長度
'參數:
'str 要測試的字符串
'************************
function strlen(str)
dim p_len,xx
p_len=0
strlen=0
if trim(str)<>"" then
p_len=len(trim(str))
for xx=1 to p_len
if asc(mid(str,xx,1))<0 then
strlen=int(strlen) + 2
else
strlen=int(strlen) + 1
end if
next
end if
end function
function strvalue(str,lennum)
dim p_num,x,i
if strlen(str)<=lennum then
strvalue=str
else
p_num=0
x=0
do while not p_num > lennum-2
x=x+1
if asc(mid(str,x,1))<0 then
p_num=int(p_num) + 2
else
p_num=int(p_num) + 1
end if
strvalue=left(trim(str),x)&"..."
loop
end if
end function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -