为什么我的页面在视频后没有重定向?

时间:2018-04-09 05:07:03

标签: html redirect video

为什么视频播放完毕后我的页面无法重定向?目前,它位于https://www.eves.website/eve_3.html

视频播完后,应该转到https://www.eves.website/eve_4.html 哪个也有。但它只是在eve_3上说。 HTML

<!DOCTYPE HTML>
<html>
    <head>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>eve_</title>
<link rel="icon" rel="preload" href="images/evecircle.png" />
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">


 <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js">
</script>
<script type="text/javascript">
  $(document).ready(function(){   
   $("#myVideo").bind('ended', function(){
      location.href="https://www.eves.website/eve_4.html";   
   }); 
  });
</script>
</head>
  <body>

<video id="myVideo" style="margin-left:-10px; margin-top:-10px;" width="105%" height="105%" autoplay>
  <source src="images/human.mp4" autoplay="true" type="video/mp4" />
    Your browser does not support the video tag.
</video>


</body>

</html>

2 个答案:

答案 0 :(得分:0)

试试这个...

$(document).ready(function(){   
  $("#myVideo").bind('ended', function(){
      window.location.href="https://www.eves.website/eve_4.html";   
  }); 
});

答案 1 :(得分:0)

这是因为它不安全,因此它不允许我重定向到另一个站点。

相关问题