function alertaa(aa) document.write("aa") end function '-----------------------------判定字符串长度--------------------------> function strlength(text) slength=0 for strlengthi=1 to len(text) str=mid(text,strlengthi,1) if asc(str)<0 or asc(str)>255 then slength=slength+2 else slength=slength+1 end if next strlength=slength end function '---------------------------检查上传图片----------------------------> function checkfilevb(text) if text="" then checkfilevb=1 else str=lcase(right(text,3)) if str<>"jpg" and str<>"gif" and str<>"bmp" then checkfilevb=2 end if end if end function '---------------------------检查上传文件----------------------------> function checkfilevb2(text) if text="" then checkfilevb2=1 else str=lcase(right(text,3)) if str<>"pdf" then checkfilevb2=2 end if end if end function '---------------------------检查上传数据库----------------------------> function checkfilevb3(text) if text="" then checkfilevb3=1 else str=lcase(right(text,3)) if str<>"mdb" then checkfilevb3=2 end if end if end function