jQuery 模糊不起作用
jQuery 的 blur()
函数无法工作。虽然输入值被保存,但它不显示。谁能告诉我为什么?我也尝试过 on('blur', function(){});
但没有成功。
$('form').each(function() {
$(this).find(':input')
.not('input[type=submit], input[type=hidden]')
.each(function() {
if (!($.trim($(this).val()))) {
if ($(this).attr('data-placeholder')) {
putPlaceholder(this);
}
}
$(this).blur(function() {
if (!($.trim($(this).val()))) {
putPlaceholder(this);
}
});
});
});
jQuery's blur()
function refuses to work. Although the input value gets saved, it doesn't show. Can anyone tell me why? I've also tried on('blur', function(){});
with no luck.
$('form').each(function() {
$(this).find(':input')
.not('input[type=submit], input[type=hidden]')
.each(function() {
if (!($.trim($(this).val()))) {
if ($(this).attr('data-placeholder')) {
putPlaceholder(this);
}
}
$(this).blur(function() {
if (!($.trim($(this).val()))) {
putPlaceholder(this);
}
});
});
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里完美运行: http://jsfiddle.net/mmmshuddup/aswXV/3/
I got it working perfectly here: http://jsfiddle.net/mmmshuddup/aswXV/3/