bella-life-blog

function OnlyNumText()
{
  if (event.keyCode >= 48 && event.keyCode <= 57) {
    return true;
  }else{ 
    window.event.keyCode = \'\';
  }
}

function UpperString(tag)
{
  var temp=document.getElementById(tag.id);
  if(temp!=null){
  document.getElementById(tag.id).value=temp.value.toUpperCase();
  } 
}

使用:

<jf:inputText  value="#{employeePageBean.employee.alOpening}" maximumLength="9" onkeypress="javascript:OnlyNumText()">

<f:validateLongRange  maximum="999999999"/>-- 限制只能输入数字位数

</jf:inputText>

 

<jf:inputText  value="#{employeePageBean.employee.hkid}" maximumLength="50" onblur="UpperString(this)"></jf:inputText>

 

分类:

技术点:

相关文章:

  • 2021-08-01
  • 2021-11-28
  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-08-01
猜你喜欢
  • 2021-08-01
  • 2021-08-01
  • 2021-08-01
  • 2021-08-01
  • 2022-12-23
  • 2021-08-01
  • 2021-08-01
相关资源
相似解决方案