clearing input placeholder in iOS5
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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) 文章来源: clearing input placeholder in iOS5