如何在JavaScript中实现下面的伪代码?我想在第二个代码摘录中包含日期检查,其中txtDate用于BilledDate。JavaScript中的日期解析和验证
If ABS(billeddate – getdate) > 31 then yesno “The date you have entered is more than a month from today, Are you sure the date is correct,”.
if (txtDate && txtDate.value == "")
{
txtDate.focus();
alert("Please enter a date in the 'Date' field.")
return false;
}
不使用的字符串操作的数学 – StingyJack 2008-10-27 15:35:33