public bool IsChinaString(string CString)
{
bool BoolValue = false;
for (int i = ; i < CString.Length; i++)
{
if (Convert.ToInt32(Convert.ToChar(CString.Substring(i, )))< Convert.ToInt32(Convert.ToChar()))
{
BoolValue = false;
}
else
{ return BoolValue = true;
}
} return BoolValue; }
页面中使用jquery判断文本框先输入的中文还是英文的判断
var c = $("#txtStreet").val().charCodeAt();
if (c >= && c <= || c >= && c <= ) { return {
label: item.StreetName_EN + "," + item.StreetName1,
value: item.StreetName_EN + "," + item.StreetName1,
}
} else { return {
label: item.StreetName1 + "," + item.StreetName_EN,
value: item.StreetName1 + "," + item.StreetName_EN,
}