$('input').each(function() {
var default_value = this.value;
$(this).focus(function(){
if(this.value == default_value) {
this.value = '';
}
});
$(this).blur(function(){
if(this.value == '') {
this.value = default_value;
}
});
});
jquery 鼠标放入input框值清空离开恢复默认值
最新推荐文章于 2021-06-16 09:15:42 发布