新闻网_让新闻离你更近 /* var userAgent = navigator.userAgent.toLowerCase(), l = window.location; var platform; if (userAgent == null || userAgent == '' || (l.href.indexOf('f=pad') != -1)) { platform = 'web' } else { if (userAgent.indexOf("mi pad") != -1 || userAgent.indexOf("xiaomi/miuibrowser") != -1 || userAgent.indexOf( "ipad") != -1) { platform = 'pad'; //location.href = "http://www.news.cn/ipad/index.htm" ; } else if (userAgent.match(/iphone/i) || userAgent.match(/iphone os/i) || userAgent.match(/android/i) || userAgent.match(/windows mobile/i) || userAgent.match(/ucweb/i)) { platform = 'phone' //location.href = "http://www.news.cn/webmobile.htm"; location.href = "http://m.news.cn"; } else if (userAgent.indexOf('gecko') > -1 && userAgent.indexOf('khtml') == -1 && userAgent.indexOf('firefox') == -1 && userAgent.indexOf('11.0') == -1) { platform = 'other mobile'; //location.href = "http://www.news.cn/webmobile.htm"; location.href = "http://m.news.cn"; } }*/ !function(_url){ var ua = navigator.userAgent.toLowerCase(), isM = ua.indexOf("mobile")!==-1, l = window.location.href, stopPc = l.indexOf("f=pad") !== -1 ; if(isM && !stopPc ) window.location.href = _url || "http://m.news.cn"; }("http://m.news.cn") (function(){ function setIframeHeight(id){ try{ var ccce = document.getElementById(id); if(ccce.attachEvent){ ccce.attachEvent("onload", function(){ ccce.height = ccce.contentWindow.document.documentElement.scrollHeight; console.log(ccce.height) }); return; }else{ ccce.onload = function(){ ccce.height = ccce.contentDocument.body.scrollHeight; console.log(ccce.height) }; return; } }catch(e){ throw new Error('setIframeHeight Error'); } } setIframeHeight('celebrate'); })()
10+
var h1fs = $.trim($('#fonts').html()); var h1cl = $.trim($('#colors').html()); var hltype = $.trim($('#headType').html()); var headarea1 = $("#hpart1"); var headarea2 = $("#hpart1_a"); var headarea3 = $("#hpart1_b"); var headarea4 = $("#hpart1_c"); //设置颜色字号 if (h1fs.indexOf("px") >= 0) { $('#headArea h1 a,#headArea_a h1 a,#headArea_b h1 a,#headArea_c h1 a').css({ "font-size": h1fs }); } if (h1cl.indexOf("red") >= 0) { $('#headArea h1 a,#headArea_a h1 a,#headArea_b h1 a,#headArea_c h1 a').css({ "color": "#db000a" }); $('#headLine .hots a,#headLine_a .hots a,#headLine_b .hots a,#headLine_c .hots a').css({ "color": "#db000a" }); } //设置显示的区块 if(hltype==1){ //头条可2行或更多,右侧有专题图 $("#headLine .part1").hide(); headarea2.show(); }else if(hltype==2){ //头条可3行或更多,右侧有专题图竖向排列 $("#headLine .part1").hide(); headarea3.show(); }else if(hltype==3){ //头条可3行或更多,右侧有专题图竖向排列 $("#headLine .part1").hide(); headarea4.show(); }else{ headarea1.show(); } /*switch (hltype) { case 1: //头条可2行或更多,右侧有专题图 //console.log("hltypehltype"+hltype) headarea1.hide(); headarea2.show(); headarea3.hide(); break case 2: //头条可2行或更多,右侧有专题图 headarea1.hide(); headarea2.hide(); headarea3.show(); break default: break }*/ /* 侯 头条代码 ! function(window, document) { (function() { if (String.prototype.trim) return; String.prototype.trim = function trim(s) { return this.replace(/(^\s*)|(\s*$)/g, ""); }; })() var hpart1 = document.querySelector("#hpart1"), hpart1_class = hpart1.getAttribute("class") || "", syhistoryid = hpart1.querySelector("#syhistoryid"), syhistoryid_class = syhistoryid.getAttribute("class") || "", hots = hpart1.querySelector(".hots"), hots_class = hots.getAttribute("class") || "", moreNews = hpart1.querySelector("#headLine .hots .moreNews"), moreNews_class = moreNews.getAttribute("class") || "", tempData = parseInt(syhistoryid.getAttribute("data-fontsize").trim()), needSmallFont = isNaN(tempData) === true ? 0 : tempData, big_tit_img = document.createElement("img"), big_tit_a = document.createElement("a"), img_url = syhistoryid.getAttribute("data-titimgsrc") || "", a_url = syhistoryid.getAttribute("data-url") || "", newImg; // if(needSmallFont) syhistoryid.setAttribute("class",syhistoryidClass+" head-linea-small-font"); switch (needSmallFont) { case 1: //头条文字增多,最多24px*30个汉字; //摘要文字不变,最多12px*62个汉字; syhistoryid.setAttribute("class",syhistoryid_class+" font-size-twenty-four"); break case 2: // 头条不变,最多30px*24个汉字; // 摘要字体变大,最多22px*32个汉字; // 高度90px & 不显示 “更多头条”; //头条和摘要间距有变化; hpart1.setAttribute("class", hpart1_class + " ninty"); hots.setAttribute("class", hots_class + " font-size-twenty-two height-fix width-auto"); moreNews.setAttribute("class", moreNews_class + " none"); break case 3: //头条和摘要同大; //头条,最多30px*24个汉字; //摘要,最多30px*24个汉字;字体加粗; //高度100px & 不显示 “更多头条”; //头条和摘要间距有变化; hots.setAttribute("class", hots_class + " font-size-thirty height-fix width-auto"); hpart1.setAttribute("class", hpart1_class + " one-hundered-height"); moreNews.setAttribute("class", moreNews_class + " none"); break case 4: //摘要大于头条; //头条,最多22px*32个汉字; //摘要,最多30px*24个汉字;字体加粗; //高度100px & 不显示 “更多头条”; //头条和摘要间距有变化; hots.setAttribute("class", hots_class + " font-size-thirty height-fix width-auto"); syhistoryid.setAttribute("class", syhistoryid_class + " font-size-twenty-two"); hpart1.setAttribute("class", hpart1_class + " one-hundered-height"); moreNews.setAttribute("class", moreNews_class + " none"); break case 5: //大头条变为图片; //图片加链接; //摘要不变; syhistoryid.innerHTML = ""; big_tit_a.target = "_blank"; big_tit_a.href = a_url; big_tit_img.src = img_url; big_tit_a.appendChild(big_tit_img); syhistoryid.appendChild(big_tit_a); syhistoryid.setAttribute("class", syhistoryid_class + " .tittoimg"); break; default: break //没有发副题,保持默认状态; //头条最多30px*24个汉字; //摘要最多12px*62个汉字; } }(window, document) */

新闻聚焦

Focus

习近平给复旦大学青年师生党员回信 全文

多条新线相继开通 全国铁路暑运今日开启

中国作为创始成员参加联合国"消除贫困联盟"

把脉年中经济形势 部委地方启动密集摸底

长江武汉段及汉江武汉段1日起实施十年禁捕

5 G
入口

5G入口-移动化社交化分享传播平台
可信服务 多彩生活

新闻网
客户端

以短视频形态为主的平台型客户端和移动门户。引领品质阅读,让资讯更丰富,用AI更懂你。

新闻社全媒报道平台

新闻社全媒报道平台,以全媒体形态,为您呈现当日最热、最重要的新闻。

新闻社
海外社交媒体平台

为了顺应世界媒体变革的需要,在新形势下更好地传播中国声音,积极回应国际社会关切。

新闻社
电视

新闻社手机电视台是面向世界播出的新闻电视频道,24小时不间断地为手机用户报道全球重大新闻事件。

新闻社客户端

"新闻社客户端"是新闻社资讯汇聚手机端的唯一品牌。遍布180多个国家的3000多名新闻社记者第一时间为你供稿,让你尽览全球新闻。

关闭
/*lazyload*/ (function(a) { a.fn.lazyload = function(b) { var c = { threshold: 0, failure_limit: 0, event: "scroll", effect: "show", container: window, skip_invisible: !0 }; b && (null !== b.failurelimit && (b.failure_limit = b.failurelimit, delete b.failurelimit), a.extend( c, b)); var d = this; return 0 == c.event.indexOf("scroll") && a(c.container).bind(c.event, function(b) { var e = 0; d.each(function() { if (c.skip_invisible && !a(this).is(":visible")) return; if (!a.abovethetop(this, c) && !a.leftofbegin(this, c)) if (!a.belowthefold(this, c) && !a.rightoffold(this, c)) a(this).trigger("appear"); else if (++e > c.failure_limit) return !1 }); var f = a.grep(d, function(a) { return !a.loaded }); d = a(f) }), this.each(function() { var b = this; b.loaded = !1, a(b).one("appear", function() { this.loaded || a("").bind("load", function() { a(b).hide().attr("src", a(b).data("original"))[c.effect](c.effectspeed), b.loaded = ! 0 }).attr("src", a(b).data("original")) }), 0 != c.event.indexOf("scroll") && a(b).bind(c.event, function(c) { b.loaded || a(b).trigger("appear") }) }), a(c.container).trigger(c.event), this }, a.belowthefold = function(b, c) { if (c.container === undefined || c.container === window) var d = a(window).height() + a(window).scrollTop(); else var d = a(c.container).offset().top + a(c.container).height(); return d <= a(b).offset().top - c.threshold }, a.rightoffold = function(b, c) { if (c.container === undefined || c.container === window) var d = a(window).width() + a(window).scrollLeft(); else var d = a(c.container).offset().left + a(c.container).width(); return d <= a(b).offset().left - c.threshold }, a.abovethetop = function(b, c) { if (c.container === undefined || c.container === window) var d = a(window).scrollTop(); else var d = a(c.container).offset().top; return d >= a(b).offset().top + c.threshold + a(b).height() }, a.leftofbegin = function(b, c) { if (c.container === undefined || c.container === window) var d = a(window).scrollLeft(); else var d = a(c.container).offset().left; return d >= a(b).offset().left + c.threshold + a(b).width() }, a.extend(a.expr[":"], { "below-the-fold": function(b) { return a.belowthefold(b, { threshold: 0, container: window }) }, "above-the-fold": function(b) { return !a.belowthefold(b, { threshold: 0, container: window }) }, "right-of-fold": function(b) { return a.rightoffold(b, { threshold: 0, container: window }) }, "left-of-fold": function(b) { return !a.rightoffold(b, { threshold: 0, container: window }) } }) })(jQuery) var _screenH = $(window).height(); // 右侧导航栏 var productBodyEv={ $_silder : $("#productBody .sliderLine"), $_list : $("#productBody .list"), $_listItem : $("#productBody .list li"), $_twoCode : $("#productBody .twoCode"), init:function(){ $("#productBody img").each(function(){ $(this).attr("src",$(this).attr("data-original")); }); /* if(_screenH-223 <= 590){//屏幕高度-本身TOP值 < 本身高度 $("#productBody").css("top",(_screenH-590)/2+200); $("#productBody .tools").css("bottom",'-60px'); }*/ productBodyEv.bodyEv(); productBodyEv.showTwoCode(); productBodyEv.goTop(); productBodyEv.closeBody(); productBodyEv.listItem(); var $_scrollAdLi = $(".scrollAd li"); var scrollAdLiLen = $_scrollAdLi.length; var str = ""; if(scrollAdLiLen==1){ $("#productBody .scrollAd .btn").hide(); } for(i=0;i1){ $("#productBody .ad2").slide({ mainCell:".scrollZt",effect:"fold", autoPlay:true,autoPage:true,interTime:6000}); }; var isTouchDevice = 'ontouchstart' in window; if(isTouchDevice){ $("#productBody").hide(); } }, listItem:function(){ productBodyEv.$_listItem.hover( function(){ $(this).addClass("on").find(".floatItem").stop().animate({"width":260},300); }, function(){ $(this).removeClass("on").find(".floatItem").stop().animate({"width":98},300); } ) }, showTwoCode:function(){ productBodyEv.$_twoCode.hover( function(){ $(this).find("div").slideDown(); }, function(){ $(this).find("div").slideUp(); } ); }, goTop:function(){ $("#productBody .goTop").click(function(){ $('html,body').animate({ scrollTop : '0px' }, 200); }); }, closeBody:function(){ $("#productBody .close").click(function(){ $("#productBody").slideUp(); }); }, bodyEv:function(){ $("#productBody").hover( function(){ $(this).find(".lazyload").each(function(){ $(this).attr("src",$(this).attr("data-original")).removeClass("lazyload"); }) }, function(){} ) } }; productBodyEv.init(); /*$(function(){ var goUrl = "http://www.xinhuanet.com/index_1.htm"; $("a").each(function(index, element) { var _src = $(this).attr("href"); if(_src=="http://www.news.cn"||_src=="http://www.xinhuanet.com"||_src=="http://www.news.cn/"||_src=="http://www.xinhuanet.com/"){ $(this).attr("href",goUrl) } }); })*/ $(function(){ $('#xwjxsMain').slimScroll({ height: '460px', width: '315px' //scrollTo: pos }); }) $(function() { //包框广告关闭按钮 var foo = function() { $("#bkTop,#bkLeft,#bkRight,#bkCloseLeft,#bkCloseRight").hide(); $("#boxBg").css({ "background": "none", "padding-top": "0" }); $("#topBody").css({ "width": "100%" }) }; $("body").on("click", "#bkCloseLeft,#bkCloseRight", foo); /*小头条下侧临时广告*/ $("#part3LAd").slide({ mainCell: ".bd ul", autoPlay: true, delayTime: 700, interTime:5000, }); //大头条发bigsize /*if($('#fonts').html()==="bigsize"){ $('#headArea h1 a').css({ "font-size":"36px"}); }*/ /* if ($('#fonts').html().indexOf("bigsize") >= 0) { $('#headArea h1 a').css({ "font-size": "36px" }); } if ($('#fonts').html().indexOf("red") >= 0) { $('#headArea h1 a').css({ "color": "#db000a" }); $('#headArea .hots p a').css({ "color": "#db000a" }); }*/ }) setTimeout( function() { $('#div_show_ad_1').slideUp(); }, 3000)
010020010010001000000000011200000000000000
wd_paramtracker("_wdxid=010020010010001000000000011200000000000000")