Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to trigger image upload button in from another button react js

upload() {
  document.getElementById("selectImage").click()
}

<div style={{display: 'grid'}}>
  <button id='plus' onClick={this.upload}>+</button>
  <input id='selectImage' hidden type="file" onChange={fileSelectHandler} />
</div>
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to get input with name in jest test 
Javascript :: black adam 
Javascript :: form.reset function in javascript 
Javascript :: which object key has highest value javascript 
Javascript :: get selected text 
Javascript :: conditional (ternary) operator function parameter 
Javascript :: javascript sleep 3 second 
Javascript :: load more button javascript 
Javascript :: firebase messaging import script 
Javascript :: javascript integer 
Javascript :: using arrow function and destructuring 
Javascript :: Mongoose filter by multiple fields 
Javascript :: new line with javascript write 
Javascript :: javascript wrap object in array 
Javascript :: javascript console.log 
Javascript :: propertyName nuxt auth 
Javascript :: jquery var_dump array 
Javascript :: javascript map to object 
Javascript :: react router history not defined 
Javascript :: how to add multiple elements to A new array javascript 
Javascript :: javascript slice string from character 
Javascript :: promise in javascript 
Javascript :: get value of textarea jquery 
Javascript :: componentwillunmount hooks 
Javascript :: how to check if the number inputed is number 
Javascript :: js check if a string is a number 
Javascript :: mongoose get id after save 
Javascript :: get list of text from div in js 
Javascript :: accepting form data node js 
Javascript :: ticking clock react js 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =