javascript - Stack up attached filename in a html input -


How can we show the attached filename for stacking above the "Choose File" input button, which will be clicked on Browse the file window browser (Firefox and Chrome) is omitted to show the file name next to the input button (see image below).

  & lt; Div class = "blaa" & gt; & Lt; A class = "delete-mark" href = "#" & gt; & Lt; Span / & gt; & Lt; / A & gt; & Lt; Input name = "file [0]" type = "file" /> & Lt; / Div & gt;   

The e-class is for delete button and trying multiple alignment parameters in the input tag does not really help because it keeps on moving the input button as well.

Enter image details here

< Div class = "post-text" itemprop = "text">

Why not a click on a hidden file input is being masked for the mask that you want for example

  & lt; Div id = "filenames" style = "width: 200px; height: 200px; border: 1px solid black; overflow: scroll;" & Gt; & Lt; / Div & gt; & Lt; Button onclick = "document.getElementById ('file'). Click ();" & Gt; Load file & lt; / Button & gt; & Lt; Input type = "file" id = "file" style = "display: none" onchange = "var filediv = document.getElementById ('filenames'). AppendChild (document.createElement ('p')); filediv.innerHTML = this.value, "/ & gt;    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -