function changetext(t_html){
while (t_html.indexOf("'")!=-1){
t_html=t_html.replace("'","$#!")
}
while (t_html.indexOf("$#!")!=-1){
t_html=t_html.replace("$#!","''")
}
return t_html
}
while (t_html.indexOf("'")!=-1){
t_html=t_html.replace("'","$#!")
}
while (t_html.indexOf("$#!")!=-1){
t_html=t_html.replace("$#!","''")
}
return t_html
}
alert("the character is invalid")
alert('不能有单引号')
如 " " 和 "abc de" 两种情况?另:哪里有JavaScript的帮助说明?能否提供一下地址?
if(/\s/.test(document.form1.txt.value))
JS版上面有链接