“日期计算剩余天数”仅显示NaN Firefox。但是在chrome中可以正常工作
function check() {
debugger
$("#txtscap1_domicilesensitivecountryfromdate").on("click", function () {
debugger
var today = new Date();
var monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
];
var d = today.getFullYear() + "-" + monthNames[today.getMonth()] + "-" + today.getDate();
var date = $("#txtscap1_domicilesensitivecountryfromdate").val();
var date1 = Date.parse(d);
var date2 = Date.parse(date);
var days = Math.ceil((date1 - date2) / (1000 * 60 * 60 * 24));
$("#txtscap1_domicilesensitivecountry_trigger").val(days);
// alert(days);
});
}
2.5