scroll.js

来自「这是一个ajax的例子大家好好的看看就是一个鱼眼的效果」· JavaScript 代码 · 共 30 行

JS
30
字号
if(!dojo._hasResource["dijit._base.scroll"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.dojo._hasResource["dijit._base.scroll"] = true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView = function(/* DomNode */node){	//	summary	//	Scroll the passed node into view, if it is not.	// don't rely on that node.scrollIntoView works just because the function is there	// it doesnt work in Konqueror or Opera even though the function is there and probably	//	not safari either	// native scrollIntoView() causes FF3's whole window to scroll if there is no scroll bar 	//	on the immediate parent	// dont like browser sniffs implementations but sometimes you have to use it	// #6146: IE scrollIntoView is broken	// It's not enough just to scroll the menu node into view if	// node.scrollIntoView hides part of the parent's scrollbar,	// so just manage the parent scrollbar ourselves	var parent = node.parentNode;	var parentBottom = parent.scrollTop + dojo.marginBox(parent).h; //PORT was getBorderBox	var nodeBottom = node.offsetTop + dojo.marginBox(node).h;	if(parentBottom < nodeBottom){		parent.scrollTop += (nodeBottom - parentBottom);	}else if(parent.scrollTop > node.offsetTop){		parent.scrollTop -= (parent.scrollTop - node.offsetTop);	}};}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?