Button inside a label

后端 未结 5 1039
后悔当初
后悔当初 2021-02-12 15:20

I have a label with \"for=\"the pointer to the checkbox input\"\" and as long as I know, this for can be added only for label

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-12 15:37

    What I've done is the following:

    
    
    
    onButtonClick() {
      document.getElementById('fileUpload').click();
    }
    

提交回复
热议问题