(4)事件处理——(1)事件处理(Handling Events)

JavaScript has several built-in ways of reacting to user interaction and other events. To make a page dynamic and responsive, we need to harness this capability so that we can, at the appropriate times, use the jQuery techniques we have learned so far and the other tricks we'll learn later. While we could do this with vanilla JavaScript, jQuery enhances and extends the basic event handling mechanisms to give them a more elegant syntax, while at the same time making them more powerful.

j s有几个内置的方法对用户的操作和其他事件作出反应。为了让一个网页是动态的,而且可响应我们需要驾驭这种能力,以便于我们可以在恰当的时间使用我们目前学到的jquery基数和一会学到的其他技巧。尽管我们可以通过js来做这些事情,jquery扩展增强了基本事件的处理能力,提供了更加优雅的语法,同时让他变的更加强大。


原文地址:https://www.cnblogs.com/riasky/p/3360963.html