使用Jquery限制浏览器窗口高度不能小于200像素? [英] Limit the browser windows height can not less than 200 px using Jquery?

查看:147
本文介绍了使用Jquery限制浏览器窗口高度不能小于200像素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望当窗口大小小于200像素时,用户不能拖动浏览器的周围行并调整浏览器大小;

  // if($(window).height> 200){
$(window).resize(function(){
after_resize(function(){
Book。 ();
Book.book_position();
Book.dragdrop_init();
calculate_zoom_factor();

if($(。viewportBinder)。长度){
$(#view).css('height',$(window).height());
$(#view).css('width',$ (window).width());
content = element.viewport('update');
}

},300);
});
//

如果这个if语句的大小小于这个值,然而,超过200px是否有可能不允许用户拖动屏幕? (目前的情况是用户仍然可以拖动到小于200px的高度,但它什么都不会做)谢谢 解决方案

方式来控制用户是否可以调整大小或从Javascript中移动浏览器窗口。



..想象一下如果可以的话,弹出窗口和垃圾广告会遇到的问题(! )

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 > 200){
$(window).resize(function() {
after_resize(function(){
    Book.zoom_auto();
    Book.book_position();
    Book.dragdrop_init();
    calculate_zoom_factor();

    if ($(".viewportBinder").length){                   
    $("#view").css('height',$(window).height());
    $("#view").css('width',$(window).width());  
    content = element.viewport('update');
    }

}, 300);
});
//}

This if statement can order not to do anything if the size is less than 200px , however, is it possible to not allow the user drag the screen? (The current situation is user can still drag to the height less than 200px, but it will do nothing) Thanks

解决方案

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 (!)

这篇关于使用Jquery限制浏览器窗口高度不能小于200像素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆