splitscreen.js
来自「Phidget21.NET Ebox4300下的一个重要组件」· JavaScript 代码 · 共 24 行
JS
24 行
function SplitScreen (nonScrollingRegionId, scrollingRegionId) {
// store references to the two regions
this.nonScrollingRegion = document.getElementById(nonScrollingRegionId);
this.scrollingRegion = document.getElementById(scrollingRegionId);
// set the position model for each region
this.nonScrollingRegion.style.position = "fixed";
this.scrollingRegion.style.position = "absolute";
// fix the size of the scrolling region
this.resize(null);
// add an event handler to resize the scrolling region when the window is resized
registerEventHandler(window, 'resize', getInstanceDelegate(this, "resize"));
}
SplitScreen.prototype.resize = function(e) {
// update the vertical offset of the scrolling region to account for the height of the non-scrolling region
this.scrollingRegion.style.top = this.nonScrollingRegion.offsetHeight + "px";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?