![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
<script language="javascript"> function DateDiff(sDate1, sDate2) { var aDate, oDate1, oDate2, iDays aDate = sDate1.split("-") oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) aDate = sDate2.split("-") oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) return iDays } </script>
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; float: left;"> <asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <tr> <td class="news_list ul" style="padding: 5px; line-height: 15px; float: left;"> ·<a href="../../../cm_web/common/cmjjjc_ggl_detail.aspx?id=<%# DataBinder.Eval(Container.DataItem, "va") %>&code=<%# DataBinder.Eval(Container.DataItem, "vd") %>" style="text-decoration: none; color: #666;" target="_blank"><%# DataBinder.Eval(Container.DataItem, "vb") %></a> <script type="text/javascript"> var myDate = new Date(); tyear = myDate.getYear(); tmonth = myDate.getMonth() + 1; tdate = myDate.getDate(); nowdate = tyear + "-" + tmonth + "-" + tdate; if (DateDiff(nowdate, '<%# DataBinder.Eval(Container.DataItem, "vc") %>') < 7) { document.write("<img src='../html/new_cmjjjc/images/new.gif' />"); } </script> </td> </tr> </ItemTemplate> </asp:Repeater> <br /> </table>