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.
精彩评论