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>

分类

  1. JQUERY

按月统计

  1. 2021-12 (49)
  2. 2022-02 (1)
  3. 2022-03 (1)
  4. 2023-05 (4)
  5. 2023-06 (3)
  6. 2023-07 (6)
RangeTime:0.017845s
RangeMem:198.57 KB
返回顶部 留言