function getInput(val,a){
    var id = 'ser-key';
    if(a=='focus'){
        document.getElementById(id).value='';    
    }    
    if(a=='blur'){
        if(val==''){
            document.getElementById(id).value= "请输入VIP卡号或手机号码查询";        
        }else{
            document.getElementById(id).value= val;        
        }
        
    }
}
 <input name="keyword" type="text" class="inp_a" id="ser-key" onfocus="getInput(this.value,'focus')" onblur="getInput(this.value,'blur')" value="请输入VIP卡号或手机号码查询" size="40" />

 

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2021-05-19
  • 2021-09-10
  • 2021-12-08
  • 2021-06-23
  • 2022-01-12
  • 2021-06-13
猜你喜欢
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
  • 2022-01-06
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案