JavaScript的浏览器设置窗口大小 [英] Javascript set browser window size

查看:223
本文介绍了JavaScript的浏览器设置窗口大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是设置在页面加载时浏览器窗口大小的最佳方法?
我认为这是可以用JavaScript来实现。请解释。这里是我的code不工作!

 < HTML和GT;
<身体的onload =window.resizeTo(640,480)>
<视频SRC =rushmore.mp4控制=控制>
你的浏览器不支持视频标签
< /视频>
< /身体GT;
< / HTML>


解决方案

我把这个答案的评论成了长。

这是我发现的唯一的事情就是贴近铬窗口大小调整是使用Chrome扩展,可以调整窗口的大小。
实际的扩展命令是 chrome.windows.update(...)

这里看看

但我不知道这是你在找什么。结果
如果还是感兴趣的内容至少有2扩展,可以做到这一点,我所看到的尝试
这个

要快乐,万事如意!

What is the best way to set the size of the browser window when the page loads? I think this can be done in JavaScript. Please explain. Here is my code that is not working!

<html>
<body onload="window.resizeTo(640,480)">
<video src="rushmore.mp4" controls="controls">
your browser does not support the video tag
</video>
</body>
</html>

解决方案

I put this in an answer as the comment became to long.

The only thing that I have found that is close to the resizing of the chrome window is to use a chrome extension that can resize the window. The actual extension command is chrome.windows.update(...).

Take a look here.

But I am not sure this is what you are looking for.
If it still interests you there are at least 2 extensions that can do this, that I have seen try this one

Be happy and good luck!

这篇关于JavaScript的浏览器设置窗口大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆