2013-06-12 82 views
1

我一直試圖找出一個簡單的縮小腳本IE8頁面加載時,但我無法獲得所需的結果。IE8 - 瀏覽器縮小腳本

基本上一旦頁面加載,我希望它縮小到50%,並在全屏模式下F11

我曾嘗試以下:

  1. document.body.style.zoom = "50%"

  2. <style> div
    {
    transform: scale(0.5,0.5);
    zoom: 0.5;
    }
    </style>

  3. <body style="zoom: 50%">

,但我仍然不成功作爲整個頁面變成unview能夠和扭曲。

我的代碼如下:

<!DOCTYPE html> 
<html> 
<body id="body"> 

<p>A script on this page starts this clock:</p> 
<p id="demo"></p> 

<script> 
document.getElementById("body").innerHTML=Max(); 
document.getElementById("body").innerHTML=Zoom(); 

var myVar=setInterval(function(){myTimer()},5000); 

function myTimer() 
{ 
var d=new Date(); 
var t=d.toLocaleTimeString(); 
document.getElementById("demo").innerHTML=t; 
setTimeout("javascript:HereLink('d:dashboard~p:i3pub16he83q7e9c~r:qqq9loggk8hvpl85', 
'Refresh');",5000); 
} 

function max() { 
    var wscript = new ActiveXObject("Wscript.shell"); 
    wscript.SendKeys("{F11}"); 
} 

function zoom() { 
     document.body.style.zoom = "50%" 
} 

+0

適當的瀏覽器實現了[全屏API](https://developer.mozilla.org/en-US/docs/Web/Guide/DOM/Using_full_screen_mode)。 – Koterpillar

回答