fckiecleanup.js

来自「站长俱乐部新闻发布程序 采用全新代码设计,完全不同于国内所有程序 采用国际」· JavaScript 代码 · 共 34 行

JS
34
字号



var	FCKIECleanup = function( attachWindow )
{

	this.Items = new Array() ;

	attachWindow._FCKCleanupObj = this ;
	attachWindow.attachEvent( 'onunload', FCKIECleanup_Cleanup ) ;	
}
	
FCKIECleanup.prototype.AddItem = function( dirtyItem, cleanupFunction )
{
	this.Items.push( [ dirtyItem, cleanupFunction ] ) ;
}
	
function FCKIECleanup_Cleanup()
{
	var aItems = this._FCKCleanupObj.Items ;
	var iLenght = aItems.length ;

	for ( var i = 0 ; i < iLenght ; i++ )
	{
		var oItem = aItems[i] ;
		oItem[1].call( oItem[0] ) ;
		aItems[i] = null ;
	}
	
	this._FCKCleanupObj = null ;
	
	if ( CollectGarbage )
		CollectGarbage() ;
}

⌨️ 快捷键说明

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