<input type="text" id="showtime" value="" /><script type="text/javascript">function ymdhis(){ var obj = new Date(); var y = obj.getFullYear(); var m = obj.getMonth()+1; var d = obj.getDate(); var h = obj…
代码: //判断是否超期(有效期开始超过一年后算已超期) function IsEffect(effectDate) { var val = ""; var currentDate = new Date(); var year = currentDate.getFullYear() - 1;//当前年-1 var month = currentDate.getMonth()+1;//月份是从0索引的,所以要+1 var day = currentDate.getDate();//获取当…