Guest User

Untitled

a guest
Feb 24th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. document.getElementById("upload_button").onchange = function () {
  2. document.getElementById("upload_file").value = this.value;
  3. };
  4.  
  5. <div id="Form_FileInput_Container"><input type="file" id="upload_button" /></div>
  6. <input class="Form_Input" id="upload_file" placeholder="Choose File" disabled="disabled" />
  7.  
  8. #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; }
  9. #Form_FileInput_Container input { filter: alpha(opacity=0); opacity: 0; width: 100px; height: 100px; }
  10.  
  11. <input type="file" id="upload_button" onchange="cutomButton()" />
  12.  
  13. function customButton() {
  14. var z=document.getElementById("upload_button").value;
  15. document.getElementById("upload_file").value = z;
  16. alert(document.getElementById("upload_file").value);
  17. }
Add Comment
Please, Sign In to add comment