21,891
社区成员
发帖
与我相关
我的任务
分享我躲在这里,手握着香槟。function DisplayCalendar()
<form id=frmInput name=frmInput onsubmit="return DisplayCalendar()" action=# method=post>
<IMG style="CURSOR: pointer" onclick=avascript:DisplayCalendar()>
<input name='txtYear' id="txtYear"/>
</form>
function DisplayCalendar()
{
if (document.getElementById("txtYear").value <1900||isNaN(document.getElementById("txtYear").value))//不知道这个isNaN()是啥函数?
{
alert("请输入合法年份!")
document.getElementById("txtYear").focus();
return false;
}
}