Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.getElementById("upload_button").onchange = function () {
- document.getElementById("upload_file").value = this.value;
- };
- <div id="Form_FileInput_Container"><input type="file" id="upload_button" /></div>
- <input class="Form_Input" id="upload_file" placeholder="Choose File" disabled="disabled" />
- #Form_FileInput_Container { position: relative; width: 100px; height: 100px; background: #e5e5e5 url('path/to/upload/image/forms_upload.png') no-repeat; border: 1px solid #cccccc; }
- #Form_FileInput_Container input { filter: alpha(opacity=0); opacity: 0; width: 100px; height: 100px; }
- <input type="file" id="upload_button" onchange="cutomButton()" />
- function customButton() {
- var z=document.getElementById("upload_button").value;
- document.getElementById("upload_file").value = z;
- alert(document.getElementById("upload_file").value);
- }
Add Comment
Please, Sign In to add comment