Limit the browser windows height can not less than 200 px using Jquery?

前端 未结 3 1540
太阳男子
太阳男子 2021-01-25 07:08

I would like the user can not drag the surrounding line of browser and resize the browser when the window size is less than 200 px;

//if ($(window).height > 2         


        
相关标签:
3条回答
  • 2021-01-25 07:44

    There's no way to control whether the user can resize or move the browser window from Javascript.

    ..imagine the problems you'd have with popups and spam ads if you could (!)

    0 讨论(0)
  • 2021-01-25 07:46

    It's seems that medium is doing it: https://medium.com

    0 讨论(0)
  • 2021-01-25 07:46

    If the browser lets you do window.resizeTo(w,h), than you can set it. BUT modern day browsers normally disable that method by default.

    0 讨论(0)
提交回复
热议问题