清除iOS5中的输入占位符 [英] clearing input placeholder in iOS5
本文介绍了清除iOS5中的输入占位符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我注意到在iOS5中,输入占位符文本在焦点上不会自动清除。
I noticed that in iOS5, input placeholder text doesn't clear automatically on focus.
我尝试了这个jquery函数,但是它没有工作:
I tried this jquery function but it's not working:
$('input[type="number"]').focus(function(){
$('this').attr('placeholder','');
});
推荐答案
在我看来问题就在这里
$('this').attr('placeholder','');
尝试更换:
$('this')
使用
$(this)
这篇关于清除iOS5中的输入占位符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文