?? char.asp
字號:
<%
function filtestr(str) '去掉字符串的雙引號和&,@,等
str=replace(str,"""","")
str=replace(str,"“","")
str=replace(str,"”","")
str=replace(str,"‘","")
str=replace(str,"’","")
'str=replace(str,"'","") '單引號
str=replace(str,"&","")
str=replace(str,"@","")
filtestr=str
end function
function htmltocode(str) '轉換html代碼
if not isnull(str) then
str=replace(str, ">", ">")
str=replace(str, "<", "<")
str=replace(str, chr(32), " ")
str=replace(str, chr(9), " ")
str=replace(str, chr(34), """)
str=replace(str, chr(39), "'")
str=replace(str, chr(13), "")
str=replace(str, chr(10) & chr(10), "</p><p> ")
str=replace(str, chr(10), "<br> ")
htmltocode=str
end if
end function
function codetohtml(str) '還原html代碼
if not isnull(str) then
str=replace(str, ">", ">")
str=replace(str, "<", "<")
str=replace(str, " "," ")
str=replace(str, """, chr(34))
str=replace(str, "'", chr(39))
str=replace(str, "</p><p> ",chr(10) & chr(10))
str=replace(str, "<br> ", chr(10))
codetohtml=str
end if
end function
function leftchar(str,charnum) '//截取字符串
charnum=int(charnum)
if charnum=0 then
leftchar=str
else
if getlen(str)>charnum then
leftchar=left(str,0.5*charnum)&"..."
else
leftchar=str
end if
end if
end function
function getlen(str) '//計算字符串長度,漢字一個算兩個
if trim(str)="" or isnull(str) then
getlen=0
else
dim p_len,x
p_len=0
getlen=0
p_len=len(trim(str))
for x=1 to p_len
if asc(mid(str,x,1))<0 then
getlen=int(getlen) + 2
else
getlen=int(getlen) + 1
end if
next
end if
end function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -