<html>
<head>
<title>跳转视频到最后一秒</title>
</head>
<body>
<video id="myVideo" width="320" height="240" controls>
Your browser does not support the video tag.
</video>
[removed]
var video = document.getElementById("myVideo");
document.addEventListener("keydown", function(event) {
if (event.key === "End") {
video.currentTime = video.duration;
}
});
[removed]
</body>
</html>