手机
当前位置:查字典教程网 >脚本专栏 >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代码】相关文章:

将信息保存到一个XML文件的vbs代码

提供个可以显示农历的VBS代码

黑客必须要知道的几个vbs文件代码

收藏的比较精典VBS代码

VBScript 文件操作代码小结

VBS实现的系统服务备份优化代码

vbs xmldom初次实战获取QQ签名的代码

WMI StdRegProv 通过wmi操作注册表的vbscript实现代码 (本地或远程)

SendKeys clip.exe 发送中文的代码

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

精品推荐
分类导航