//显示当前日期
var d = new Date();
var s2 = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
$('#EntTime36').val(s2);
//计算
function test(){
//日期格式必须yyyy-mm-dd,月和日不带0,如2011-3-2
var date1 = $("#EntTime36").val();
var date = new Date(date1);
var num = $('#Timelimit').val;
date.setDate(date.getDate()+num);
var date2 = date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate();
$('#Maturitydate').val(date2);
- }
-
- 调用这个方法了 但是无法实现效果 哪里的问题
-
-
- ![图片说明](https://img-ask.csdn.net/upload/201602/01/1454315190_331391.png)
-
-
- ![图片说明](https://img-ask.csdn.net/upload/201602/01/1454315251_630398.png)