[CODE]<input id="text1" name=text1 type=text onBlur="check()" >
<Script Language ="JavaScript">function check(){ if(document.all.text1.value >999){ alert("数据必须小于999"); }; if(document.all.text1.value <1){ alert("数据必须在于0"); }; } </Script>
[/CODE]
那你再写个函数不就行了吗?直接判断也行,直接代替也可replace(aa,"%"," ")或者是instr函数找出非法字符,个人意见