@ 最新
也谈利用JavaScript做浏览器类型及版本检测

检测函数

function(){
    var ua= navigator.userAgent, tem,
        M= ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
    if(/trident/i.test(M[1])){
        tem=  /\brv[ :]+(\d+)/g.exec(ua) || [];
        return 'IE '+(tem[1] || '');
    }
    if(M[1]=== 'Chrome'){
        tem= ua.match(/\b(OPR|Edge)\/(\d+)/);
        if(tem!= null) return tem.slice(1).join(' ').replace('OPR', 'Opera');
    }
    M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
    if((tem= ua.match(/version\/(\d+)/i))!= null) M.splice(1, 1, tem[1]);
    return M.join(' ');
}
全国高等学校名单(普通/成人高等学校),JS选择框及JSON数据

JSON数据样本

[{"code":"4111010001","charge":"教育部","level":"本科","name":"北京大学","location":"北京市","remark":"","prov":"北京市"},
{"code":"4111010002","charge":"教育部","level":"本科","name":"中国人民大学","location":"北京市","remark":"","prov":"北京市"},
{"code":"4111010003","charge":"教育部","level":"本科","name":"清华大学","location":"北京市","remark":"","prov":"北京市"},
{"code":"4111010004","charge":"教育部","level":"本科","name":"北京交通大学","location":"北京市","remark":"","prov":"北京市"},
{"code":"4111010005","charge":"北京市","level":"本科","name":"北京工业大学","location":"北京市","remark":"","prov":"北京市"}]
中国56个民族选择框及JSON数据(包括英文名,人口)

JSON数据样本

[{"name":"汉族","en":"Han","population":"1220844520"},{"name":"蒙古族","en":"Manchu","population":"5981840"},
{"name":"回族","en":"Hui","population":"10586087"},{"name":"藏族","en":"Tibetan","population":"6282187"},
{"name":"维吾尔族","en":"Uyghur","population":"10069346"}]
中国省份,城市,县,镇,村五级联动选择框-JS/JSON数据

JSON数据样本

["11:北京市","12:天津市","13:河北省","1305:邢台市","1304:邯郸市","1303:秦皇岛市","14:山西省",
"1403:阳泉市","1402:大同市","1401:太原市","1409:忻州市","1408:运城市","1407:晋中市",
"1406:朔州市","1405:晋城市","1411:吕梁市","1410:临汾市","15:内蒙古自治区","1503:乌海市",
"1502:包头市","1501:呼和浩特市","1509:乌兰察布市","1508:巴彦淖尔市","1507:呼伦贝尔市",
"2108:营口市","2107:锦州市","2106:丹东市","2105:本溪市","2104:抚顺市","2103:鞍山市"]
$ 热门标签
$ 声明
本站所有代码及文字都是作者精心汇编整理而成,转载代码及文字请明确注明出处和作者名称。