<!DOCTYPE html>
<HTML>
<HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style>
video {
right: 0;
bottom: 0;
min-width: 50%;
min-height: 50%;
max-width: 90%;
max-height:90%;
width: auto;
height: auto;
</style>
</HEAD>
<BODY bgcolor=black>
<center><video width="853" height="480" autoplay="autoplay">
<source src="file:///C:/Program Files/NARUTO SHIPPUDEN Ultimate Ninja STORM 2/IntroMovie.mp4" type="video/mp4" />
Your browser does not support HTML5 video.
</video></center>
</BODY>
<script type="text/javascript">
document.body.addEventListener("onclick", function(){
alert("Hello! I am an alert box!!");
});
document.body.addEventListener("oncontextmenu", function(){
alert("Hello! I am an alert box!!");
});
document.body.addEventListener("onkeypress", function(){
alert("Hello! I am an alert box!!");
});
</script>
</HTML>
For some reason whenever I click on the body (Whether inside or outside of the video) the alert boxes don't pop up.
Is there any reason why the code isn't showing the alert boxes?