JQuery Live 更改 TextArea 的 FocusOut 事件未触发
似乎无法找到一种方法来对文本区域的输入类型进行更改或聚焦,尝试了很多不同的方法,但到目前为止没有任何效果...这是我当前的迭代,也不起作用...
我是使用最新的 jquery 版本。
$('input[type="text"],input[type="textarea"]').live(
'change focusout', function (e)
{
debugger;
alert('text area');
});
cannot seem to find a way to get change or focusout to fire for a input type of textarea, tried a lot of different things and nothing is working thus far... this is my current iteration that does not work either...
I am using latest jquery release.
$('input[type="text"],input[type="textarea"]').live(
'change focusout', function (e)
{
debugger;
alert('text area');
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
描述
Textarea 不是一个输入元素,它是一个 textarea ;) 查看我的示例和这个 jsFiddle 演示
示例
Html
jQuery
更多信息
更新
我不知道这是否是您想要的,但看起来您希望在值更改或焦点丢失时触发该事件。我的示例和 jsFiddle 已更新。
Description
Textarea is not an input element, it is a textarea ;) Check out my sample and this jsFiddle Demonstration
Sample
Html
jQuery
More Information
Update
I don't know if that is what you want but it looks like you want the event fired if the value is changed or the focus is lost. My sample and jsFiddle is updated.