jQuery trigger file input

后端 未结 21 1565
梦如初夏
梦如初夏 2020-11-22 08:49

Am trying to trigger an upload box (browse button) using jQuery.
The method I have tried now is:

$(\'#fileinput\').trigger(\'click\');   
21条回答
  •  隐瞒了意图╮
    2020-11-22 09:23

    Check out my fiddle.

    http://jsfiddle.net/mohany2712/vaw8k/

    .uploadFile {
      visibility: hidden;
    }
    
    #uploadIcon {
      cursor: pointer;
    }
    
      

提交回复
热议问题