我在html 5和jquery / javascript中制作切换全屏vídeo的内容?
我试试这个,但不工作
<script>
$("#nomedogame8").click( function() {
var element = document.getElementById("nomedogame8");
if (element.mozRequestFullScreen)
{
element.mozRequestFullScreen();
}
else if (element.webkitRequestFullScreen)
{
element.webkitRequestFullScreen();
}
});
</script>
<script>
$("#nomedogame8").click( function() {
var element = document.getElementById("nomedogame8");
if (element.mozCancelFullScreen)
{
element.mozCancelFullScreen();
}
else if (element.webkitExitFullscreen)
{
element.webkitExitFullscreen();
}
});
</script>
Hélp-me再次请............................
答案 0 :(得分:0)
试试这个:
var element = document.getElementById("nome");
if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}