<html>
<button onclick="closes()">create</button>
<button onclick="tos()">change</button>
<script>
function closes()
{
window.open("","myname","width=400, height=400");
}
function tos()
{
window.resizeTo(700,200);
}
</script>
</html>
window.resizeTo cannot resize the window, what's going on?
Thanks
Check out MDN
Learn
Starting from Firefox 7, the size of the browser window cannot be changed. The following rules must be followed:
1. The size of windows or Tabs not created through window.open cannot be set.
2. When a window contains more than one Tab, the window size cannot be set.
That is, the window size that can be changed by resizeTo or resizeBy is only those pages opened with window.open, and the window opened by window.open can only have one tab