WEB开发网
开发学院网页设计JavaScript 汇总Javascript各种判断脚本(javascript经典例子)... 阅读

汇总Javascript各种判断脚本(javascript经典例子)

 2010-09-14 13:16:07 来源:WEB开发网   
核心提示: ''函数功能:对输入框的特殊字串进行过滤保存'参数strPass:过滤前的字符串'返回值:过滤后的字符串'Function SQLencode(byVal strPass)strPass = Replace(strPass, "&"

'********************************************

'函数功能:对输入框的特殊字串进行过滤保存

'参数strPass:过滤前的字符串

'返回值:过滤后的字符串

'********************************************

Function SQLencode(byVal strPass)
strPass = Replace(strPass, "&", "&")
strPass = Replace(strPass, "<", "<")
strPass = Replace(strPass, ">", ">")
strPass = Replace(strPass, """", """)
strPass = Replace(strPass, "'", "'")
strPass = Replace(strPass, " ", " ")
strPass = Replace(strPass,chr(13)&chr(10),"<br/>")
SQLencode = strPass
End Function

'********************************************

'函数功能:对SQLencode函数过滤后的字符串进行还原

'参数strPass:经过过滤后的字符串

'返回值:还原的过滤前的字符串

'********************************************

Function SQLdecode(byVal strPass)
If Not isNull(strPass) Then
strPass = Replace(strPass, "<", "<")
strPass = Replace(strPass, ">", ">")
strPass = Replace(strPass, ""","""" )
strPass = Replace(strPass, "'","'" )
strPass = Replace(strPass,"<br/>",chr(13)&chr(10))
End If
SQLdecode = strPass
End Function

上一页  5 6 7 8 9 10 

Tags:汇总 Javascript 各种

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接