var mynum=window.location.search;var url = window.location.href;//获取当前Urlfunction GetUrlRelativePath()//获取当前相对路径的方法  {    var url = document.location.toString();    var arrUrl = url.split(“//”);    var start = arrUrl[1].indexOf(“/”);    var relUrl = arrUrl[1].substring(start);//stop省略,截取从start开始到结尾的所有字符    if(relUrl.indexOf(“?”) != -1){      relUrl = relUrl.split(“?”)[0];    }    return relUrl;  }if(mynum ==){var sUserAgent = navigator.userAgent;var mobileAgents = [Windows CE, iPod, Symbian, iPhone, BlackBerry, Android];if (sUserAgent.indexOf(Android)-1 && (sUserAgent.indexOf(ERD79)-1 || sUserAgent.indexOf(MZ60)-1 || sUserAgent.indexOf(GT-P7)-1 || sUserAgent.indexOf(SCH-P7)-1)) {} else {if (location.href.indexOf(?pc) == -1) {for (var i = 0; imobileAgents.length; i++) {if (sUserAgent.indexOf(mobileAgents[i])-1) {//location = http://www.ecns.cn/m/;url=GetUrlRelativePath(url);//获取当前url的相对路径if(url.indexOf(“/m/”)==0)//以/m/开头{//alert(url);}else{var reg_fenye=/_[0-9]*.shtml$/;if(reg_fenye.test(url))//分页跳转到第一页{url=url.replace(reg_fenye,”.shtml”);//注意这句,reg_fenye必须单独定义,不能写在””中,否则JavaScript将其当做普通字符串}//alert(url);url=http://www.ecns.cn/m+url;location = url;}break;}}}}//var ads = [];}Friday May 25, 2018中文HomeNewsBusinessTravelPhotoVideoLearning ChineseVoicesRIGHT BGLINEExperienceMost popular in 24hChina to allow 11 non-state firms to import crude oilMerkel visit aims for multilateralismChinese FM says China firmly supports Trump-Kim meetingThe U.S. revokes Chinas invitation to 2018 RIMPACXi: Audits to bolster clean governanceMoreTop newsChina, EU agree to boost economic and trade relations China-Russia economic cooperation enters new era Chinese military criticizes U.S. withdrawal of naval exercise invitation China appreciates Burkina Fasos decision to cut diplomatic ties with Taiwan Trump sends letter to Kim, says Singapore summit will not happenMoreVideoThousands join Hong Kong bun-snatching festivalChinese soldiers clear mines on borderNewsPoliticsBusinessSocietyCultureMilitarySci-techEntertainmentSportsOddFeaturesBizEconomyTravelTravel NewsTravel TypesEventsFoodHotelBar & ClubArchitectureGalleryPhotoCNS PhotoVideoVideoLearning ChineseLearn About ChinaSocial ChineseBusiness ChineseBuzz WordsBilingualResourcesECNS WireSpecial CoverageInfographicsVoicesLINEMedia partners:Peoples Daily Online|Xinhuanet|China.org.cn|ChinaDaily.com.cn|CGTN|Globaltimes.cn|Chinaplus.cri.cn|Shine.cn|JSCHINA|China Military Online|Taiwan.cn|Sina English|Caijing|Caixin Online|CE.cn|GMW.cn|Women of China|newsgd.comBack to top Links |About Us |Jobs |Contact Us |Privacy PolicyCopyright ©1999-2018Chinanews.com. All rights reserved.Reproduction in whole or in part without permission is prohibited.var cnzz_protocol = ((“https:” == document.location.protocol) ? ” https://” : ” http://”);document.write(unescape(“%3Cspan id=cnzz_stat_icon_1253145956%3E%3C/span%3E%3Cscript src=” + cnzz_protocol + “s13.cnzz.com/z_stat.php%3Fid%3D1253145956 type=text/javascript%3E%3C/script%3E”));

By 多哈

发表评论

邮箱地址不会被公开。 必填项已用*标注

15 − 8 =