JS 阻止浏览器缩放

本文最后修改于 149 天前,部分内容可能已经过时!
$(document).ready(function () {
       $(document).keydown(function (event) {
           if (event.ctrlKey == true && (event.which == '107' || event.which == '109' || event.which == '187' || event.which == '189'))
           {
               event.preventDefault();
            }
        });

       $(window).bind('mousewheel DOMMouseScroll', function (event) {
          if (event.ctrlKey == true) {
              event.preventDefault();
          }

       });
})


Tags:none
上一篇
下一篇

该页面评论已关闭