手机
当前位置:查字典教程网 >脚本专栏 >vbs >防SQL注入的VBSrcipt代码
防SQL注入的VBSrcipt代码
摘要:functioncheckstr(strname)strn=trim(strname.value)str=trim(strname.valu...

<scriptlanguage="vbscript">

functioncheckstr(strname)

strn=trim(strname.value)

str=trim(strname.value)

fori=1tolen(str)

strcheck=asc(left(str,1))

ifnot((strcheck=<122andstrcheck>=97)or(strcheck<=90andstrcheck>=65)or(strcheck<=57andstrcheck>=48))then

msgbox("请勿使用除英文字母及数字以外的字符!")

strname.value=left(strn,i-1)

strname.focus

exitfor

endif

str=Right(str,len(str)-1)

next

endfunction

functionchecknum()

checknum=true

ifnotdocument.all.txtMailSize.value=""then

ifnotIsNumeric(document.all.txtMailSize.value)then

msgbox("请勿使用数字以外的字符!")

document.all.txtMailSize.value=""

document.all.txtMailSize.focus

checknum=false

elseifdocument.all.txtMailSize.value>5ordocument.all.txtMailSize.value<0then

msgbox("请填写5-0之间的数字!")

document.all.txtMailSize.value=""

document.all.txtMailSize.focus

checknum=false

endif

endif

endif

endfunction

functioncheckupdate()

checkupdate=true

ifdocument.all.txtU_name.value=""ordocument.all.txtMailSize.value=""then

msgbox("您填写的信息不完全!")

checkupdate=false

endif

endfunction

functioncompare()

compare=true

ifnotdocument.all.txtRePsw.value=document.all.txtPsw.valuethen

msgbox("两次密码输入不一致!")

document.all.txtRePsw.focus

compare=false

endif

endfunction

【防SQL注入的VBSrcipt代码】相关文章:

VBScript 文件操作代码小结

用vbs分割与合并文本文件的代码

获取远程机器共享目录的物理路径的代码

vbs正则表达式代码

VBScript根据盘符找设备名的代码

adodb.stream读文件到数组的代码

一个实现VBS倒计时的代码

VBS通过WMI获取CPU使用率的代码

发老兵及海洋VBS解包工具代码

海阳顶端网进百度blog必须输入密码的vbscript代码

精品推荐
分类导航