问题
I noticed that in iOS5, input placeholder text doesn't clear automatically on focus.
I tried this jquery function but it's not working:
$('input[type="number"]').focus(function(){
$('this').attr('placeholder','');
});
回答1:
It looks to me the problem lies here
$('this').attr('placeholder','');
Try replacing:
$('this')
With
$(this)
来源:https://stackoverflow.com/questions/8282348/clearing-input-placeholder-in-ios5