以下javascript代码在adobe acrobat pro中无效:
function CheckDate(){
var Date = this.getField("enrollDate").value;
var currentdate = new Date().getDate();
if(Date < currentdate){
app.alert("Date should be greater than");
}
else{
return false;
}
}
答案 0 :(得分:0)
对于初学者,我不会调用您的变量Date
,因为它是JavaScript中日期对象的名称。我只想把它改成:
// lowercase 'date' doesn't conflict with 'Date' object
var date = this.getField( 'enrollDate' ).value;