Guest User

Untitled

a guest
Jul 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Check CreateObjectURL</title>
  5. </head>
  6. <script type="text/javascript" language="javascript">
  7.  
  8. window.URL = window.URL || window.webkitURL;
  9.  
  10. function ChangeProperty()
  11. {
  12. var v = document.getElementById("myvideo");
  13. var file = document.getElementById("fileControl").files[0];
  14. v.setAttribute("src",window.URL.createObjectURL(file));
  15. }
  16. </script>
  17. <body>
  18. <div >
  19. <video id="myvideo" src="movie.ogg" controls ></video>
  20. <input type="file" id="fileControl" />
  21. <button id="btnprops" onClick="ChangeProperty()" >update</button>
  22. </div>
  23. </body>
  24. </html>
Add Comment
Please, Sign In to add comment