<html>
<body>
<video id="myVideo" width="320" height="240" poster="w3javascript.gif" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
<p>Click the button to change the poster image.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("myVideo").poster = "../images/w3schoolscomlogo.png";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_video_poster by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:48:21 GMT -->
</html>