<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<script>
var x = 0;
var frameVideo = "<iframe id='videoplayer' frameborder='0' src='https://www.youtube.com/embed/TPWG33dgdK4?autoplay=1&rel=0&controls=0&showinfo=0&modestbranding=1&enablejsapi=1&origin=https%3A%2F%2Fwww.google.com' width='100%' height='100%'></iframe>";
$(document).ready(function () {
$(".wwhowlbg").attr("title", "Play Video");
});
function startVideo() {
x = 1;
document.querySelector(".wwhowlbg").innerHTML=frameVideo;
}
</script>
<style type="text/css">
.wwhowlbg {
width:640px;
height:360px;
background-color:green;
background-image:url(//static1.squarespace.com/static/54f0e2f7e4b0a7bce1ae4ba2/t/5527f82de4b06a8825578580/1428682798191/?format=500w);
background-repeat:no-repeat;
background-size: 640px 400px;
cursor:pointer;
}
.wwhowlbg:hover {
background-image:url(//lifewithzooza.x10host.com/wwhowldark.png);
}
</style>
<div class="wwhowlbg" onclick="startVideo();"></div>
这是我自定义视频播放器的代码。我想这样做,以便当我点击新放置的iframe
时,它会消失并再次成为我的绿色开始页面。但是,我希望它能从我暂停的地方继续下去。这可能吗?感谢。