I'm new to front-end development, and I'm trying to open a file (an .xml file). I have a drop-down menu called File with the structure:
File:
- Open
- Save
I want that when I press the "Open" tab, the file select window appear so I can choose the file. I tried to put an <input type="file">
inside the <a>
element like that:
<a href="#" onclick="openFile()"><input type="file">Open<a>
But a huge button appears next to it, and I don't want that to appear, I just want It behaviour.
Here is a little fiddle to show the scenario fiddle