js学习
jQuery(document).ready(function () { var MyDate=new Date(); jQuery("#gsggDiv li").each(function(){ var publicDate=new Date(jQuery(this).find(".gsggDatePublic").text()); var overDate=new Date(jQuery(this).find(".gsggDateOver").text()); if(Date.UTC(publicDate)<=Date.UTC(MyDate)&&Date.UTC(overDate)>=Date.UTC(MyDate)) { jQuery(this).find(".gsggImage").attr("src","/nhb/Themes/Default/Css/Images/ico06.gif"); } }); }); jQuery(document).ready(function () { var MyDate=new Date(); var date=MyDate.getDate()+2; var month=MyDate.getMonth()+1; var overDate=new Date(MyDate.getFullYear()+"-"+month+"-"+date); jQuery(".crosstalbe").each(function(){ jQuery(this).find("td.tdmodified").each(function(){ var modifDate=new Date(jQuery(this).text()); var modifoverdate=modifDate.getDate()+2; var modifovermonth=modifDate.getMonth()+1; var modifoverDate=new Date(modifDate.getFullYear()+"-"+modifovermonth+"-"+modifoverdate); if(Date.UTC(modifoverDate)<=Date.UTC(overDate)) { jQuery(this).prev().append("<img src='/nhb/themes/default/css/images/new_gb.gif'/>"); } }); }); }); jQuery(document).ready(function () { jQuery(".tdmodified").prepend("[");
jQuery(".tdmodified").append("]"); });