简体   繁体   中英

How to change the size of a window or minimize?

Im using this code to refresh the parent window and close the popup window..Is there any way to minimize or change the size of the popup window intead of closing it?

<script language="JavaScript">
<!--
function refreshParent() {
  window.opener.location.href = window.opener.location.href;

  if (window.opener.progressWindow)

 {
    window.opener.progressWindow.close()
  }
  window.close();
}
//-->
</script>

You can use window.resizeTo() method. See Example

Try:

function changeScreenSize(w, h)
{
    window.resizeTo(w, h)
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM