Home  >  Article  >  Web Front-end  >  ff下JQuery无法监听input的keyup事件的解决方法_jquery

ff下JQuery无法监听input的keyup事件的解决方法_jquery

WBOY
WBOYOriginal
2016-05-16 17:09:331179browse

复制代码 代码如下:

$(document).ready(function(){
    $('#news_title').bind('input',fun).bind('keyup',fun);
});

//function list
var fun=function(){
    value=$(this).val();
    $('.prev').text(value);
}


注:

bind('input',fun)  用于ff下keyup

bind('keyup',fun) 用于ie

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn