zoukankan      html  css  js  c++  java
  • input点击删除默认value,以及只能输入数字,删除,tab

    /*inputhastip类绑定事件*/
     $('.inputhastip').css("color", "#999");
     $('.inputhastip').bind({
      focus:function(){
       if(this.value==this.defaultValue)
       {
        this.value="";
        $(this).css("color", "#333");
       }
      },
      blur:function(){
       if(this.value=="")
       {
        this.value = this.defaultValue;
        $(this).css("color", "#999");
       }
      }
     });
     
    //指定输入数字,删除,tab
    $('.number').keydown(function(e){
     
      if((e.which>95&&e.which<106) || (e.which==8) || (e.which==46) || (e.which==9))
      {
       return true;
      }else{
       return false;
      }
     })
  • 相关阅读:
    python10.31
    python10.29
    python10.28
    python10.27
    python10.25
    python10.24
    python10.23
    四边形不等式与决策单调
    0x57~0x59
    0x55~0x56
  • 原文地址:https://www.cnblogs.com/atomgame/p/3886717.html
Copyright © 2011-2022 走看看