我需要最大限度地提高負載嘗試下面的代碼,但不工作,我使用IE11瀏覽器我的彈出窗口。最大化瀏覽器的onload
<script>
window.moveTo(0, 0);
window.resizeTo(screen.width, screen.height);
</script>
我需要最大限度地提高負載嘗試下面的代碼,但不工作,我使用IE11瀏覽器我的彈出窗口。最大化瀏覽器的onload
<script>
window.moveTo(0, 0);
window.resizeTo(screen.width, screen.height);
</script>
這是爲我工作,應該爲你工作,請嘗試:
<!DOCTYPE html>
<html>
<body>
<p>Open a new window</p>
<button onclick="openWin()">Create window</button>
<script>
var myWindow;
function openWin() {
var x = screen.width;
var y = screen.height;
myWindow = window.open("https://stackoverflow.com/", "mywindow", "width="+x+",height="+y+",fullscreen=yes");
myWindow.moveTo(0, 0);
}
</script>
</body>
</html>
我用下面這段代碼演示
myWindow=window.open('','','width=100%,height=100%');
myWindow.document.write("This is 'myWindow'");
myWindow.moveTo(0,0);
myWindow.resizeTo(screen.width, screen.height);
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
function maximize() {
//Your logic here
}
$(document).ready(function(){
maximize();
});
</script>
這是射擊在文檔的加載方法和邏輯實現部分,我建議武功你讀到這篇文章: https://stackoverflow.com/a/7525760/6644368
我需要最大限度地全部可用的寬度和高度不能調整..同樣,當你點擊最大化按鈕,在瀏覽器 – madhu
老實說,設置窗口切換到全屏模式自身的讓我立即關閉爲窗口。 –
我與你意見一致,但是這是我的客戶要求我做的:) – madhu