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

用vbs实现的利用ADSL拨号变ip刷投票的代码

Hardware_Info.vbs 获取硬件信息的VBS代码

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

VBScript 监控磁盘更改事件实现代码

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

SendKeys clip.exe 发送中文的代码

vbs 注册表操作类代码

运行同一目录下的可执行程序的VBS代码

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

VBScript 常用函数总结

精品推荐
分类导航