在新的固定大小窗口中打开 HTML 链接

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22444356/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:16:00  来源:igfitidea点击:

HTML Open Link in New Fixed Size Window

htmlpopup

提问by TJH

I am trying to add a pop up confirmation window for a contact us form I am making. I want a new html page to to open up in a new window that has a fixed size and is centered in the users screen.

我正在尝试为我正在制作的联系我们表单添加一个弹出确认窗口。我想要一个新的 html 页面在一个新窗口中打开,该窗口具有固定大小并在用户屏幕中居中。

Ideally I would love to only use HTML/CSS but I don't know if that is even possible. If not I don't mind using Javascript or jquery if it's simpler.

理想情况下,我只想使用 HTML/CSS,但我不知道这是否可行。如果不是,我不介意使用 Javascript 或 jquery,如果它更简单。

Thank you!

谢谢!

回答by Angelo

<a href="#" onClick="window.open('yourpage.htm','pagename','resizable,height=260,width=370'); return false;">New Page</a><noscript>You need Javascript to use the previous link or use <a href="yourpage.htm" target="_blank">New Page</a></noscript>