var s = "allenglish";
var re = new RegExp("^[a-zA-Z]+$");
//要包含数字的话是 new RegExp("^[a-zA-Z0-9]+$");
if (re.test(s)) {alert("是全英文");}
else {alert("不是全英文");}
var s = "ggfahhaha";
var re = new RegExp("^[a-z]*|[A-Z]*$");
if (re.test(s))
{alert("ture");}
else
{alert("false");}