function DateDemo(){
var d, s = "今天日期是: ";
d = new Date();
s += (d.getMonth() + 1) + "/";
s += d.getDate() + "/";
s += d.getYear();
return(s);
}
var d, s = "今天日期是: ";
d = new Date();
s += (d.getMonth() + 1) + "/";
s += d.getDate() + "/";
s += d.getYear();
return(s);
}
<INPUT TYPE="text" NAME="m" onKeyup="xx(this);">
</FORM>
<SCRIPT LANGUAGE="JavaScript">
<!--
function xx(e){
var m = new Date().getMonth() + 1;
if (e.value == m)
{
alert("输入的是当月!");
}
}
//-->
</SCRIPT>