在jquery中是否存在触发任何事件时触发函数的内容?
我想要这样的事情:
$("*").anyEvent(function(){
$("#error").html("");
});
答案 0 :(得分:16)
$('*').on('blur change click dblclick error focus focusin focusout hover keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup resize scroll select submit', function(){
$('#error').empty();
});
......但你想这样做吗?