$("input[type*=text]").each(function(){
var oldValue=$(this).val();
$(this).focus(function(){
if($(this).val()==oldValue){
$(this).val('');
}
})
.blur(function(){
if($(this).val()==""){
$(this).val(oldValue)
}else{
oldValue = $(this).val();
}
})
});
原创文章,作者:,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/271431.html