亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? fckw3crange.js

?? java web網(wǎng)絡(luò)編程示例,原代碼資源
?? JS
字號(hào):
?/*
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
 *
 * == BEGIN LICENSE ==
 *
 * Licensed under the terms of any of the following licenses at your
 * choice:
 *
 *  - GNU General Public License Version 2 or later (the "GPL")
 *    http://www.gnu.org/licenses/gpl.html
 *
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 *
 * == END LICENSE ==
 *
 * This class partially implements the W3C DOM Range for browser that don't
 * support the standards (like IE):
 * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html
 */

var FCKW3CRange = function( parentDocument )
{
	this._Document = parentDocument ;

	this.startContainer	= null ;
	this.startOffset	= null ;
	this.endContainer	= null ;
	this.endOffset		= null ;
	this.collapsed		= true ;
}

FCKW3CRange.CreateRange = function( parentDocument )
{
	// We could opt to use the Range implentation of the browsers. The problem
	// is that every browser have different bugs on their implementations,
	// mostly related to different interpretations of the W3C specifications.
	// So, for now, let's use our implementation and pray for browsers fixings
	// soon. Otherwise will go crazy on trying to find out workarounds.
	/*
	// Get the browser implementation of the range, if available.
	if ( parentDocument.createRange )
	{
		var range = parentDocument.createRange() ;
		if ( typeof( range.startContainer ) != 'undefined' )
			return range ;
	}
	*/
	return new FCKW3CRange( parentDocument ) ;
}

FCKW3CRange.CreateFromRange = function( parentDocument, sourceRange )
{
	var range = FCKW3CRange.CreateRange( parentDocument ) ;
	range.setStart( sourceRange.startContainer, sourceRange.startOffset ) ;
	range.setEnd( sourceRange.endContainer, sourceRange.endOffset ) ;
	return range ;
}

FCKW3CRange.prototype =
{

	_UpdateCollapsed : function()
	{
      this.collapsed = ( this.startContainer == this.endContainer && this.startOffset == this.endOffset ) ;
	},

	// W3C requires a check for the new position. If it is after the end
	// boundary, the range should be collapsed to the new start. It seams we
	// will not need this check for our use of this class so we can ignore it for now.
	setStart : function( refNode, offset )
	{
		this.startContainer	= refNode ;
		this.startOffset	= offset ;

		if ( !this.endContainer )
		{
			this.endContainer	= refNode ;
			this.endOffset		= offset ;
		}

		this._UpdateCollapsed() ;
	},

	// W3C requires a check for the new position. If it is before the start
	// boundary, the range should be collapsed to the new end. It seams we
	// will not need this check for our use of this class so we can ignore it for now.
	setEnd : function( refNode, offset )
	{
		this.endContainer	= refNode ;
		this.endOffset		= offset ;

		if ( !this.startContainer )
		{
			this.startContainer	= refNode ;
			this.startOffset	= offset ;
		}

		this._UpdateCollapsed() ;
	},

	setStartAfter : function( refNode )
	{
		this.setStart( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) + 1 ) ;
	},

	setStartBefore : function( refNode )
	{
		this.setStart( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) ) ;
	},

	setEndAfter : function( refNode )
	{
		this.setEnd( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) + 1 ) ;
	},

	setEndBefore : function( refNode )
	{
		this.setEnd( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) ) ;
	},

	collapse : function( toStart )
	{
		if ( toStart )
		{
			this.endContainer	= this.startContainer ;
			this.endOffset		= this.startOffset ;
		}
		else
		{
			this.startContainer	= this.endContainer ;
			this.startOffset	= this.endOffset ;
		}

		this.collapsed = true ;
	},

	selectNodeContents : function( refNode )
	{
		this.setStart( refNode, 0 ) ;
		this.setEnd( refNode, refNode.nodeType == 3 ? refNode.data.length : refNode.childNodes.length ) ;
	},

	insertNode : function( newNode )
	{
		var startContainer = this.startContainer ;
		var startOffset = this.startOffset ;

		// If we are in a text node.
		if ( startContainer.nodeType == 3 )
		{
			startContainer.splitText( startOffset ) ;

			// Check if it is necessary to update the end boundary.
			if ( startContainer == this.endContainer )
				this.setEnd( startContainer.nextSibling, this.endOffset - this.startOffset ) ;

			// Insert the new node it after the text node.
			FCKDomTools.InsertAfterNode( startContainer, newNode ) ;

			return ;
		}
		else
		{
			// Simply insert the new node before the current start node.
			startContainer.insertBefore( newNode, startContainer.childNodes[ startOffset ] || null ) ;

			// Check if it is necessary to update the end boundary.
			if ( startContainer == this.endContainer )
			{
				this.endOffset++ ;
				this.collapsed = false ;
			}
		}
	},

	deleteContents : function()
	{
		if ( this.collapsed )
			return ;

		this._ExecContentsAction( 0 ) ;
	},

	extractContents : function()
	{
		var docFrag = new FCKDocumentFragment( this._Document ) ;

		if ( !this.collapsed )
			this._ExecContentsAction( 1, docFrag ) ;

		return docFrag ;
	},

	// The selection may be lost when clonning (due to the splitText() call).
	cloneContents : function()
	{
		var docFrag = new FCKDocumentFragment( this._Document ) ;

		if ( !this.collapsed )
			this._ExecContentsAction( 2, docFrag ) ;

		return docFrag ;
	},

	_ExecContentsAction : function( action, docFrag )
	{
		var startNode	= this.startContainer ;
		var endNode		= this.endContainer ;

		var startOffset	= this.startOffset ;
		var endOffset	= this.endOffset ;

		var removeStartNode	= false ;
		var removeEndNode	= false ;

		// Check the start and end nodes and make the necessary removals or changes.

		// Start from the end, otherwise DOM mutations (splitText) made in the
		// start boundary may interfere on the results here.

		// For text containers, we must simply split the node and point to the
		// second part. The removal will be handled by the rest of the code .
		if ( endNode.nodeType == 3 )
			endNode = endNode.splitText( endOffset ) ;
		else
		{
			// If the end container has children and the offset is pointing
			// to a child, then we should start from it.
			if ( endNode.childNodes.length > 0 )
			{
				// If the offset points after the last node.
				if ( endOffset > endNode.childNodes.length - 1 )
				{
					// Let's create a temporary node and mark it for removal.
					endNode = FCKDomTools.InsertAfterNode( endNode.lastChild, this._Document.createTextNode('') ) ;
					removeEndNode = true ;
				}
				else
					endNode = endNode.childNodes[ endOffset ] ;
			}
		}

		// For text containers, we must simply split the node. The removal will
		// be handled by the rest of the code .
		if ( startNode.nodeType == 3 )
		{
			startNode.splitText( startOffset ) ;

			// In cases the end node is the same as the start node, the above
			// splitting will also split the end, so me must move the end to
			// the second part of the split.
			if ( startNode == endNode )
				endNode = startNode.nextSibling ;
		}
		else
		{
			// If the start container has children and the offset is pointing
			// to a child, then we should start from its previous sibling.
			if ( startNode.childNodes.length > 0 &&  startOffset <= startNode.childNodes.length - 1 )
			{
				// If the offset points to the first node, we don't have a
				// sibling, so let's use the first one, but mark it for removal.
				if ( startOffset == 0 )
				{
					// Let's create a temporary node and mark it for removal.
					startNode = startNode.insertBefore( this._Document.createTextNode(''), startNode.firstChild ) ;
					removeStartNode = true ;
				}
				else
					startNode = startNode.childNodes[ startOffset ].previousSibling ;
			}
		}

		// Get the parent nodes tree for the start and end boundaries.
		var startParents	= FCKDomTools.GetParents( startNode ) ;
		var endParents		= FCKDomTools.GetParents( endNode ) ;

		// Compare them, to find the top most siblings.
		var i, topStart, topEnd ;

		for ( i = 0 ; i < startParents.length ; i++ )
		{
			topStart	= startParents[i] ;
			topEnd		= endParents[i] ;

			// The compared nodes will match until we find the top most
			// siblings (different nodes that have the same parent).
			// "i" will hold the index in the parants array for the top
			// most element.
			if ( topStart != topEnd )
				break ;
		}

		var clone, levelStartNode, levelClone, currentNode, currentSibling ;

		if ( docFrag )
			clone = docFrag.RootNode ;

		// Remove all successive sibling nodes for every node in the
		// startParents tree.
		for ( var j = i ; j < startParents.length ; j++ )
		{
			levelStartNode = startParents[j] ;

			// For Extract and Clone, we must clone this level.
			if ( clone && levelStartNode != startNode )		// action = 0 = Delete
				levelClone = clone.appendChild( levelStartNode.cloneNode( levelStartNode == startNode ) ) ;

			currentNode = levelStartNode.nextSibling ;

			while( currentNode )
			{
				// Stop processing when the current node matches a node in the
				// endParents tree or if it is the endNode.
				if ( currentNode == endParents[j] || currentNode == endNode )
					break ;

				// Cache the next sibling.
				currentSibling = currentNode.nextSibling ;

				// If clonning, just clone it.
				if ( action == 2 )	// 2 = Clone
					clone.appendChild( currentNode.cloneNode( true ) ) ;
				else
				{
					// Both Delete and Extract will remove the node.
					currentNode.parentNode.removeChild( currentNode ) ;

					// When Extracting, move the removed node to the docFrag.
					if ( action == 1 )	// 1 = Extract
						clone.appendChild( currentNode ) ;
				}

				currentNode = currentSibling ;
			}

			if ( clone )
				clone = levelClone ;
		}

		if ( docFrag )
			clone = docFrag.RootNode ;

		// Remove all previous sibling nodes for every node in the
		// endParents tree.
		for ( var k = i ; k < endParents.length ; k++ )
		{
			levelStartNode = endParents[k] ;

			// For Extract and Clone, we must clone this level.
			if ( action > 0 && levelStartNode != endNode )		// action = 0 = Delete
				levelClone = clone.appendChild( levelStartNode.cloneNode( levelStartNode == endNode ) ) ;

			// The processing of siblings may have already been done by the parent.
			if ( !startParents[k] || levelStartNode.parentNode != startParents[k].parentNode )
			{
				currentNode = levelStartNode.previousSibling ;

				while( currentNode )
				{
					// Stop processing when the current node matches a node in the
					// startParents tree or if it is the startNode.
					if ( currentNode == startParents[k] || currentNode == startNode )
						break ;

					// Cache the next sibling.
					currentSibling = currentNode.previousSibling ;

					// If clonning, just clone it.
					if ( action == 2 )	// 2 = Clone
						clone.insertBefore( currentNode.cloneNode( true ), clone.firstChild ) ;
					else
					{
						// Both Delete and Extract will remove the node.
						currentNode.parentNode.removeChild( currentNode ) ;

						// When Extracting, mode the removed node to the docFrag.
						if ( action == 1 )	// 1 = Extract
							clone.insertBefore( currentNode, clone.firstChild ) ;
					}

					currentNode = currentSibling ;
				}
			}

			if ( clone )
				clone = levelClone ;
		}

		if ( action == 2 )		// 2 = Clone.
		{
			// No changes in the DOM should be done, so fix the split text (if any).

			var startTextNode = this.startContainer ;
			if ( startTextNode.nodeType == 3 )
			{
				startTextNode.data += startTextNode.nextSibling.data ;
				startTextNode.parentNode.removeChild( startTextNode.nextSibling ) ;
			}

			var endTextNode = this.endContainer ;
			if ( endTextNode.nodeType == 3 && endTextNode.nextSibling )
			{
				endTextNode.data += endTextNode.nextSibling.data ;
				endTextNode.parentNode.removeChild( endTextNode.nextSibling ) ;
			}
		}
		else
		{
			// Collapse the range.

			// If a node has been partially selected, collapse the range between
			// topStart and topEnd. Otherwise, simply collapse it to the start. (W3C specs).
			if ( topStart && topEnd && ( startNode.parentNode != topStart.parentNode || endNode.parentNode != topEnd.parentNode ) )
				this.setStart( topEnd.parentNode, FCKDomTools.GetIndexOf( topEnd ) ) ;

			// Collapse it to the start.
			this.collapse( true ) ;
		}

		// Cleanup any marked node.
		if( removeStartNode )
			startNode.parentNode.removeChild( startNode ) ;

		if( removeEndNode && endNode.parentNode )
			endNode.parentNode.removeChild( endNode ) ;
	},

	cloneRange : function()
	{
		return FCKW3CRange.CreateFromRange( this._Document, this ) ;
	},

	toString : function()
	{
		var docFrag = this.cloneContents() ;

		var tmpDiv = this._Document.createElement( 'div' ) ;
		docFrag.AppendTo( tmpDiv ) ;

		return tmpDiv.textContent || tmpDiv.innerText ;
	}
} ;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品99国产精品| 久久久国产精品不卡| 91一区在线观看| 99国产精品久久久久久久久久久| 国产精品888| 成人午夜在线播放| 99久久婷婷国产综合精品电影| kk眼镜猥琐国模调教系列一区二区 | 欧美一二三在线| 宅男噜噜噜66一区二区66| 欧美日韩久久不卡| 51精品秘密在线观看| 欧美一区二区久久| 亚洲精品一区二区精华| 久久先锋影音av鲁色资源网| 2020国产精品久久精品美国| 精品国产一区二区三区久久影院 | 日韩一区二区在线观看视频播放 | 免费在线观看视频一区| 蜜桃久久久久久久| 国产一区二区三区av电影| 国产91丝袜在线播放九色| 91啪亚洲精品| 欧美三级中文字| 欧美不卡123| 中文乱码免费一区二区| 国产精品第一页第二页第三页| 亚洲人成精品久久久久| 亚洲高清在线精品| 精品一区二区综合| 成人aaaa免费全部观看| 欧美在线观看视频在线| 日韩欧美久久一区| 中文在线资源观看网站视频免费不卡| 国产精品国产三级国产a| 亚洲永久免费视频| 久久成人av少妇免费| 国产成人精品在线看| 日本韩国一区二区三区视频| 欧美一区二区啪啪| 国产麻豆视频精品| 9i看片成人免费高清| 7777精品伊人久久久大香线蕉经典版下载 | 91老师片黄在线观看| 91.xcao| 国产精品久久免费看| 亚洲成人动漫在线观看| 国产精品一二三四| 精品视频999| 国产午夜亚洲精品不卡| 亚洲一级二级三级在线免费观看| 久久99国产精品久久99| 色综合天天综合在线视频| 日韩欧美成人一区| 亚洲黄一区二区三区| 精品亚洲porn| 欧美日本一区二区在线观看| 久久精品欧美日韩精品| 天堂成人国产精品一区| 成人免费毛片片v| 欧美一卡2卡三卡4卡5免费| 亚洲人午夜精品天堂一二香蕉| 蜜臀精品久久久久久蜜臀| 99re热这里只有精品免费视频| 日韩欧美精品在线| 一区二区三区日韩精品| 国产精品18久久久久久久久 | 91精品国产综合久久精品| 中文字幕欧美国产| 免费成人在线视频观看| 色婷婷亚洲精品| 久久久国产综合精品女国产盗摄| 日韩精彩视频在线观看| 一本久久综合亚洲鲁鲁五月天| 337p日本欧洲亚洲大胆精品 | 欧美精品三级在线观看| 亚洲欧美在线观看| 国产福利一区在线观看| 日韩一区二区免费电影| 亚洲午夜羞羞片| 色综合色狠狠综合色| 国产日产欧美一区| 国产一区福利在线| 日韩午夜激情视频| 视频一区欧美精品| 欧美日韩免费观看一区三区| 亚洲视频资源在线| aaa国产一区| 久久99精品久久只有精品| 欧美日韩在线观看一区二区| 亚洲女爱视频在线| caoporn国产精品| 国产精品久久一卡二卡| 成人免费视频一区二区| 国产亚洲午夜高清国产拍精品| 精品在线亚洲视频| 日韩一级欧美一级| 久久国产麻豆精品| 精品国产一区二区三区不卡| 免费高清在线视频一区·| 91精品国产综合久久久久久 | 青青草精品视频| 制服丝袜成人动漫| 日本强好片久久久久久aaa| 欧美日韩一区二区三区在线看| 亚洲一区免费视频| 欧美视频一区在线观看| 午夜一区二区三区视频| 4438x亚洲最大成人网| 日韩精品亚洲专区| 91精品国产综合久久久久久久| 日本成人在线视频网站| 精品国产乱码久久久久久浪潮| 久久精品国产精品亚洲红杏| 26uuu色噜噜精品一区| 丁香一区二区三区| 亚洲欧美电影一区二区| 欧美视频一区在线| 免费在线视频一区| 久久嫩草精品久久久精品一| 亚洲天堂久久久久久久| 波多野结衣在线aⅴ中文字幕不卡| 亚洲色图在线视频| 欧美日韩久久一区| 精品一区二区三区日韩| 国产色综合一区| 99久久精品国产网站| 亚洲综合色区另类av| 欧美一级日韩一级| 成人激情午夜影院| 亚洲一区二区成人在线观看| 日韩一区二区三区av| 懂色av中文一区二区三区| 亚洲免费在线观看视频| 91麻豆精品国产综合久久久久久| 久久国产综合精品| 中文字幕第一区| 欧美日韩国产综合一区二区| 青草国产精品久久久久久| 国产日韩精品一区二区三区在线| 色爱区综合激月婷婷| 美女任你摸久久| 中文字幕视频一区二区三区久| 欧美午夜一区二区三区免费大片| 精品影视av免费| 亚洲精品日日夜夜| 亚洲精品一区二区三区福利 | youjizz久久| 午夜久久久久久| 国产亚洲精品中文字幕| 欧美视频精品在线观看| 国产精品亚洲成人| 五月综合激情网| 国产亚洲成av人在线观看导航| 在线观看欧美精品| 国产激情一区二区三区桃花岛亚洲| 一区二区三区产品免费精品久久75| 日韩精品一区二区在线| 91视频一区二区三区| 奇米一区二区三区av| 国产精品三级av| 欧美日韩亚洲不卡| 99在线精品一区二区三区| 日本亚洲视频在线| 国产精品国产自产拍高清av | 日本韩国欧美一区| 日韩av网站免费在线| 国产精品久久久久久久裸模| 日韩三级视频在线观看| 97久久超碰国产精品电影| 日韩国产一区二| 成人欧美一区二区三区视频网页 | 香港成人在线视频| 久久精品夜色噜噜亚洲a∨| 91久久奴性调教| 成人一区二区在线观看| 亚洲国产欧美在线人成| 久久精品人人做人人综合| 国产成人在线影院| 日韩av电影天堂| 一区在线中文字幕| 精品国产123| 91影院在线免费观看| 黑人巨大精品欧美一区| 一区二区三区久久| 国产欧美日韩中文久久| 久久亚洲综合色| 欧美在线|欧美| 国产99久久久精品| 午夜精品久久久久久| 夜夜嗨av一区二区三区中文字幕| 久久久久久一级片| 日韩午夜激情视频| 日韩一区二区精品| 欧美日韩视频一区二区| 91免费小视频| 夫妻av一区二区| 国产一区二区在线免费观看| 日韩成人精品在线观看| 亚洲人123区|