jQuery 特殊事件绑定
html 一些页面元素按照通常的事件绑定方法会无效,这时要使用特殊的事件绑定 —— live 方法实现。
官方文档说明(如下1.4版本)
eventsA string containing a JavaScript event type, such as "click" or "keydown." As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names.
dataA map of data that will be passed to the event handler.
handler(eventObject)A function to execute at the time the event is triggered.
1. html img 标签的 点击事件绑定
$("#photo_file").live("change","input",function () { alert("file selected has changed"); })