jQuery.click() vs onClick

前端 未结 17 1853
情话喂你
情话喂你 2020-11-21 07:35

I have a huge jQuery application, and I\'m using the below two methods for click events.

First method

HTML

17条回答
  •  南旧
    南旧 (楼主)
    2020-11-21 08:19

    Well, one of the main ideas behind jQuery is to separate JavaScript from the nasty HTML code. The first method is the way to go.

提交回复
热议问题