开发者

How do you resize a popup using Javascript?

开发者 https://www.devze.com 2023-03-22 14:19 出处:网络
I have a bookmarklet that opens a small popup using window.open() and have set the width and height on it. Usually when it opens the content is the right size f开发者_运维技巧or the window. But there

I have a bookmarklet that opens a small popup using window.open() and have set the width and height on it. Usually when it opens the content is the right size f开发者_运维技巧or the window. But there is one specific time where I need to display a bigger piece of content to the user.

How can I use javascript from the page displayed in the popup to resize it?


Use window.resizeTo(). (https://developer.mozilla.org/en/DOM/window.resizeTo)


Use window.resizeBy() instead. It's far simpler.

Code.

0

精彩评论

暂无评论...
验证码 换一张
取 消