JS检测是否包含中文
var str = "www.80c.cc检测是否包含中文";
if (escape(str).indexOf("%u")<0)
{
alert("没有包含中文");
} else {
alert("包含中文");
}本文链接:http://80c.cc/ez/38.html
var str = "www.80c.cc检测是否包含中文";
if (escape(str).indexOf("%u")<0)
{
alert("没有包含中文");
} else {
alert("包含中文");
}本文链接:http://80c.cc/ez/38.html
发表评论: