win3 = window.open("Pages/Login.php", "newwindow", "width=316, height=468");
win3.moveTo(screen.width/2 - 300, screen.height/2 - 250);
结果:
为什么有不同的大小?
win3 = window.open("Pages/Login.php", "newwindow", "width=316, height=468");
win3.moveTo(screen.width/2 - 300, screen.height/2 - 250);
结果:
为什么有不同的大小?
我用resizeTo()函数修复它。
win3 = window.open("Pages/Login.php", "newwindow", "width=316, height=468");
win3.resizeTo(316, 468);
win3.moveTo(screen.width/2 - 300, screen.height/2 - 250);
泰的帮助!
从MDN为strWindowFeatures
:The string must not contain any whitespace, and each feature name and its value must be separated by a comma
所以,
win3 = window.open("Pages/Login.php", "newwindow", "width=316,height=468");
win3.moveTo(screen.width/2 - 300, screen.height/2 - 250);
应该没问题?
它没有做任何事情,结果相同。 – Yoshimitso 2014-11-14 14:46:53
请注意,您只需在该链接的图片中张贴您的网址。确保你想让互联网知道该网址。 – 2014-11-14 13:51:12
也许body或html标签在你的Login.php上有一个默认的边距或者什么(CSS) 你能显示你的css为那个页面吗? – progsource 2014-11-14 13:52:21
JSK NS:Ty,我删除了URL。 progsource:我正在使用CSS重置。 – Yoshimitso 2014-11-14 14:47:40