perchè non mi dice data non valida se è inferiore all anno 2000???codice:<script LANGUAGE="javascript"> <!--// function dataValida(txt){ var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/ if(re.test(txt)){ var adata = txt.split('/'); var gg = parseInt(adata[0],10); var mm = parseInt(adata[1],10); var aaaa = parseInt(adata[2],10); var xdata = new Date(aaaa,mm-1,gg) if((xdata.getYear()==aaaa) && (xdata.getMonth()==mm-1) && (xdata.getDate()==gg)) return xdata else return false }else return false } function controllo() { if(document.thisForm.datada.value!='') if (!dataValida(document.thisForm.datada.value)){ alert("Inserire una data valida!") document.thisForm.datada.focus(); return; } if(document.thisForm.dataa.value!='') if (!dataValida(document.thisForm.dataa.value)){ alert("Inserire una data valida!") document.thisForm.dataa.focus(); return; } document.thisForm.action="report.asp"; document.thisForm.submit(); } //--> </script>![]()