问题描述
使全屏页面成为我最喜欢的主题之一,但是每当想到这样做时,我总是会收到一个答案,那就是只能通过Flash来完成.今天,我第一次看到没有使用Flash的产品,有人可以告诉我它是如何完成的,这样我就可以实现使用它的梦想^^这是图像 http://content. screencast.com/users/cryoffalcon/folders/Jing/media/5ac91f6f-ed2f-4312-b8e3-3ac9771f5497/2012-04-13_0001.png
well making a page fullscreen is one of my favorite topics but whenever I have thought of doing it, I have always received one answer and that is, it is only done with flash.For the first time today I saw one that is not done with flash, can someone tell me how exactly it is done, so I could atlast full my dream of using it ^^here is the imagehttp://content.screencast.com/users/cryoffalcon/folders/Jing/media/5ac91f6f-ed2f-4312-b8e3-3ac9771f5497/2012-04-13_0001.png
,这是此全屏按钮所在页面的链接. http://tutorialzine.com/2010/09/html5-canvas-slideshow-jquery/
and here is the link to the page where this fullscreen button exists.http://tutorialzine.com/2010/09/html5-canvas-slideshow-jquery/
推荐答案
某些浏览器通过html5支持此功能.
Some browser support this through html5.
尝试
var docElm = document.documentElement;
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
}
else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
这篇关于通过javascript全屏显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!