如何设置浏览器的大小? [英] How to set the size of the browser?

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

问题描述

您好..

我有一个html页面..我想设置浏览器的大小,这样当我打开我的网页时,它不会占用整个屏幕..

你能帮帮我吗...

谢谢你...

Hello..
I have a page in html.. I want to set the size of the browser such that when i open my webpage it does not take the whole screen..
Can you help me plz...
Thank u...

推荐答案

即使有选项也可以这样做我建议你不要!请记住,这不是你的浏览器,而是我的!接管客户端的浏览器被认为是非常粗鲁,而是考虑动态设计您的网页...
Even there are option to do so I would advise you not to! Remember that it's not your browser but mine! It's considered very rude to take over the client's browser, instead think about dynamic design of your web page...


希望下面的链接有助于使用Window resizeTo()方法:

http://www.w3schools.com/jsref/met_win_resizeto.asp [ ^ ]

http://stackoverflow.com/questions/5238603/javascript-set-browser-window-size?lq= 1 [ ^ ]



谢谢。
Hope below links would help to use Window resizeTo() Method:
http://www.w3schools.com/jsref/met_win_resizeto.asp[^]
http://stackoverflow.com/questions/5238603/javascript-set-browser-window-size?lq=1[^]

Thanks.


这可能对你有帮助,试试一次



在< head>中部分



< script>

函数changeScreenSize(w,h)

{

window.resizeTo(w,h)

}

< / script>





在< body>中标签



<bodyönload=changeScreenSize(500,300)>



< / body> ;< / body>< / head>



更改尺寸并尝试
this may help u, try it once

In the <head> section

<script>
function changeScreenSize(w,h)
{
window.resizeTo( w,h )
}
</script>


In the <body> tag

<body önload="changeScreenSize(500,300)">

</body></body></head>

Change sizes and try it


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

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