当触发onkeydown该事件时,隐藏其它控件,然后再验证输入,
//The txtperiod clicks affairs
function onkeydownFun()
{
if(document.getElementById("<%=divHrStep1.ClientID %>")!=undefined)//The hr div concealed, the object don't was early to start to turn
{
document.getElementById("<%=divHrStep1.ClientID %>").style.display='none';
}
var btnValidate= document.getElementById("<%=btnValidate.ClientID %>");
var divStep1= document.getElementById("<%=divStep1.ClientID %>");
if(divStep1!=undefined)
divStep1.style.display='none';
if(btnValidate!=undefined)
btnValidate.disabled=false;
}
function TwoEvent(e)
{
onkeydownFun();
return LimitNumberInput(e);
}
<asp:TextBox ID="txtPeriod" runat="server" Width="54px" TextFormat="SmallInt" οnkeydοwn="return TwoEvent(this);"
MaxLength="6" Text=""></asp:TextBox>