全屏视频

时间:2014-04-13 13:01:09

标签: javascript jquery html5

我在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再次请............................

1 个答案:

答案 0 :(得分:0)

试试这个:

var element = document.getElementById("nome");       
if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}