jQuery change method on input type=“file”

<p>一</p><p>is the ajax uploader refreshing your input element? if so you should consider using .live() method.</p><p><strong><span >$(&#39;#imageFile&#39;).live(&#39;change&#39;, function(){ uploadFile(); });</span></strong></p><p>update:</p><p>二</p><p>from jQuery 1.7+ you should use now .on()</p><p><strong><span >$(parent_element_selector_here or document ).on(&#39;change&#39;,&#39;#imageFile&#39; , function(){ uploadFile(); });</span></strong></p>
RangeTime:0.006988s
RangeMem:204.09 KB
返回顶部 留言