Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将使用什么 jquery 函数来停止keyup传播<input>到身体。
keyup
<input>
我用于 event.stopPropagation();单击特定元素;不确定如何将其用于所有输入。
event.stopPropagation();
谢谢大家 !
$("input, textarea").keyup(function(e){ e.stopPropagation(); });
textarea为了安全起见,也添加了它。
textarea