jquery为例。获取焦点而不触发事件:$("input ").focus(); 焦点事件:$("input").focus(function(){ $("input").css("background-color","#FFFFCC"); }); 转载于:https://www.cnblogs.com/a6948076/p/9781821.html