问题
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.
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.
Thank you!
回答1:
<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>
来源:https://stackoverflow.com/questions/22444356/html-open-link-in-new-fixed-size-window