moveTo并在firefox上调整大小 [英] moveTo and resize on firefox

查看:75
本文介绍了moveTo并在firefox上调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

i在屏幕中间有一个500x400px的弹出窗口

,里面有迷你摄影库。

我想要的是点击一个缩略图并在同一个窗口中打开一个页面

全屏大并移动到坐标(0,0)

我写了一些代码来做到这一点:


< script language =" JavaScript">

<! -

函数resize_()

{

window.resizeTo(screen.width,screen.height)

moveTo(0 ,0)

}

- >

< / script>

< / head>

< body onload =" javascript :resize _();">


但我得到的是什么是:

与IE:Windows移动到(0,0)并且变得更大但不是全屏

与FIREFOX:窗口没有移动并且没有'''调整大小

有没有人让我明白什么是错的上面的代码?

非常感谢


-

franz

解决方案




franz写道:

function resize_()
{
window.resizeTo(screen.width,screen.height)
moveTo(0,0)
}
< body onload =" javascript : resize _();">

但我得到的是:
with FIREFOX:窗口没有移动而且没有调整大小




Firefox可以配置为允许或禁止脚本执行某些

的事情,以便Firefox配置为禁止脚本移动或

弹出窗户。


-


Martin Honnen
http://JavaScript.FAQTs.com/


franz写道:

我有一个以500x400px为中心的弹出窗口在屏幕中间
和里面有一个迷你照相馆。
我想要的是点击缩略图并在同一个窗口中打开一个页面
全屏大并转移到坐标(0,0)




使用您的代码: http://dorward.me.uk/tmp/fullscreen.jpeg


用户访问您的网站时一个适合他们的

桌面大小的窗口。调整您的网站以适应他们的窗口,不要尝试调整他们的

系统以适应您的网站 - 这些努力注定要失败。

-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

Home是〜/ .bashrc的地方


" David Dorward" ; <做***** @ yahoo.com> ha scritto

我有一个位于屏幕中间的500x400px的弹出窗口
,里面有一个迷你摄影库。
我想要的是点击缩略图并在同一窗口中打开一个页面
全屏大并移动到坐标(0,0)


用户访问您的网站,其窗口大小适合他们的桌面。调整你的网站以适应他们的窗口,不要试图调整他们的
系统以适应你的网站 - 这种努力注定要失败。




谢谢捕获。

我真的不想让用户系统适应我的网站。

我想要的是我的页面适应了用户的桌面。

似乎用我的简单代码无法做到这一点。

也许你可以建议我一些更专业的代码来做我的意思。对于Martin来说,我已经浏览过网站上显示自动调整大小的窗口

firefox。因此,只有当

firefox

在当地设置良好时,才能调整moveTo和调整大小。


---

franz


hallo everyone,
i have a popup window 500x400px centered in the middle of the screen
and inside it there''s a mini-photogallery.
what i want is to click on a thumbnail and open in the same window a page
that is fullscreen big and move to co-ordinates (0,0)
I''ve written some code to do that:

<script language="JavaScript">
<!--
function resize_()
{
window.resizeTo(screen.width,screen.height)
moveTo(0,0)
}
-->
</script>
</head>
<body onload="javascript:resize_();">

but what i get from this is:
with IE: the windows moves to (0,0) and becomes bigger but not fullscreen
with FIREFOX: the window doesn''t move and doesn''t resize
Is there anyone who let me understand what''s wrong with the code above?
Thanks a lot

--
franz

解决方案



franz wrote:

function resize_()
{
window.resizeTo(screen.width,screen.height)
moveTo(0,0)
} <body onload="javascript:resize_();">

but what i get from this is: with FIREFOX: the window doesn''t move and doesn''t resize



Firefox can be configured to allow or disallow script to do certain
things so that Firefox is then configured to disallow script to move or
resilze the window.

--

Martin Honnen
http://JavaScript.FAQTs.com/


franz wrote:

i have a popup window 500x400px centered in the middle of the screen
and inside it there''s a mini-photogallery.
what i want is to click on a thumbnail and open in the same window a page
that is fullscreen big and move to co-ordinates (0,0)



Using your code: http://dorward.me.uk/tmp/fullscreen.jpeg

The user visits your website with a window that is the right size for their
desktop. Adapt your website to fit their window, don''t try to adapt their
system to suit your website - such efforts are doomed to failure.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


"David Dorward" <do*****@yahoo.com> ha scritto

i have a popup window 500x400px centered in the middle of the screen
and inside it there''s a mini-photogallery.
what i want is to click on a thumbnail and open in the same window a page
that is fullscreen big and move to co-ordinates (0,0)

The user visits your website with a window that is the right size for
their
desktop. Adapt your website to fit their window, don''t try to adapt their
system to suit your website - such efforts are doomed to failure.



thanks for the capture.
I really didn''t mean to adapt the user system to my website.
What I''d like is that my page adapts itself to the desktop of the user.
It seems that this cannot be done with my simple code.
Maybe you can suggest me some code more pro to do what i mean.
Reguarding to Martin, i''ve browsed sites showing self-resizeable windows on
firefox. So it sounds strange to me that moveTo and resize work only if
firefox
is locally well setted.

---
franz


这篇关于moveTo并在firefox上调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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