none
可以包含空格 if(/^[a-zA-Z0-9- ]*$/.test(str) == false) { alert('Your search string contains illegal characters.'); }