在某一個頁面中需要控制body的樣式{overflow:hidden}為這個 這樣寫的this.$("body").css("overflow","hidden"); 如果直接獲取body的某個樣式,顯示的是undefined這是為什么 xieyiClick : function(e) { var $checkbox = this.$("#checkbox-xieyi"); if ($checkbox.prop("checked")) { this.error(); this.$("#btn-register").removeAttr("disabled"); this.$(".screen").css({"display":"block"}); this.$("body").css("overflow","hidden"); this.$(".user_book").css("display","block"); } else { this.error("show", "請先仔細閱讀注冊協議并選擇同意."); this.$("#btn-register").attr("disabled", ""); } },其實我只是在一個頁面中設置body的樣式為overflow:hiden 因為現在是點擊出現一個彈框 同樣我需要頁面不能滑動
在backbone中怎樣在某個頁面設置整個body的樣式
郎朗坤
2018-08-13 10:10:51