<input type="file" id="selectedFile" style="display: none;" />
<input type="button" value="Browse..." onclick="document.getElementById('selectedFile').click();" />
This will surely work as I have used it in my projects.
More Related Contents:
- Close ad to continue as free user?
- How to add a black shadow on top of a div block with background image?
- JS hide function error
- How to read with JavaScript [closed]
- How to implement something like this GIF that using mouse drag and select items
- Javascript counting all the characters from a HTML document
- Set cookie and get cookie with JavaScript [duplicate]
- Load and execution sequence of a web page?
- Disabling browser print options (headers, footers, margins) from page?
- JSFiddle code not working in my own page
- All About…. Z-Index?
- How to disable scroll without hiding it?
- HTML selected option background-color CSS style
- Why my show hide button needs double-click on first time
- How to print HTML content on click of a button, but not the page? [duplicate]
- “pointer-events: none” does not work in IE9 and IE10
- jQuery Validation using the class instead of the name value
- Dark mode flickers a white background for a millisecond on reload
- How to create checkbox inside dropdown?
- collapse and expand tabs jquery / simple accordion
- How to trigger CSS “hover state” using Javascript? [duplicate]
- Javascript-Setting background image of a DIV via a function and function parameter
- Gaussian Blur onHover Using jQuery
- Rotate div text after clicking on button using jquery and css
- How to Bootstrap navbar static to fixed on scroll?
- How to use pagination on HTML tables?
- How to access css properties in javascript when applied via external CSS file?
- Split text into pages and present separately (HTML5)
- How can I reorder elements with JavaScript?
- Can you have multiple lines in an element?