.innerHTML + Maro.innerHTML + Maro.innerHTML; Maro.onmouseover = function() { Marp = true; } Maro.onmouseout = function() { Marp = false; } Maro.scrollTop = 0; function startMar() { Mart = setInterval(scrollingMq,speed); if(!Marp) Maro.scrollTop += 2; } function scrollingMq() { if(Maro.scrollTop%lh != 0) { Maro.scrollTop += 2; if(Maro.scrollTop >= Maro.scrollHeight / 2) Maro.scrollTop = 0; } else { clearInterval(Mart); setTimeout(startMar,delay); } } setTimeout(startMar,delay); } //获取当前日期的前7天日期并和内容发布日期比较 edit by yutao 20160504 $(function(){ $.ajax({ type: "POST", url:'/membermanager/getSevenBeforeDate.jspx', dataType: 'json', success:function(data){ var preMonday=data.preMonday; $(".releaseDate").each(function(){ var releaseDate=$(this).text(); var d1 = new Date(preMonday.replace(/\-/g, "\/")); var d2 = new Date(releaseDate.replace(/\-/g, "\/")); if(d2>d1){ $(this).text("new"); }else{ $(this).text(""); } }); } }); });