为什么屏蔽不了空格?

function sep_space() //阻止空格输入
{
if(event.keyCode==32)
event.returnValue=false;
}
上面这段代码是屏蔽输入时按下的空格键,
但只在IE 里好用,
在比较新的Netscape7.8里却不好用,
请教高手这是怎么回事
---------------------------------------------------------------

function HTMLEncode(fString)
if not isnull(fString) then

fString = Replace(fString, CHR(32), "")
fString = Replace(fString, CHR(9), "")

fString=ChkBadWords(fString)
HTMLEncode = fString
end if
end function

调用:
name=HTMLEncode(request("name"))

Published At
Categories with Web编程
comments powered by Disqus