fcktools_ie.js
资源名称:Myblog.rar [点击查看]
上传用户:wlfwy2004
上传日期:2016-12-12
资源大小:33978k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
Java
- /*
- * FCKeditor - The text editor for internet
- * Copyright (C) 2003-2005 Frederico Caldeira Knabben
- *
- * Licensed under the terms of the GNU Lesser General Public License:
- * http://www.opensource.org/licenses/lgpl-license.php
- *
- * For further information visit:
- * http://www.fckeditor.net/
- *
- * File Name: fcktools_ie.js
- * Utility functions. (IE version).
- *
- * File Authors:
- * Frederico Caldeira Knabben (fredck@fckeditor.net)
- */
- // Appends a CSS file to a document.
- FCKTools.AppendStyleSheet = function( documentElement, cssFileUrl )
- {
- return documentElement.createStyleSheet( cssFileUrl ) ;
- }
- // Removes all attributes and values from the element.
- FCKTools.ClearElementAttributes = function( element )
- {
- element.clearAttributes() ;
- }
- FCKTools.GetAllChildrenIds = function( parentElement )
- {
- var aIds = new Array() ;
- for ( var i = 0 ; i < parentElement.all.length ; i++ )
- {
- var sId = parentElement.all[i].id ;
- if ( sId && sId.length > 0 )
- aIds[ aIds.length ] = sId ;
- }
- return aIds ;
- }
- FCKTools.RemoveOuterTags = function( e )
- {
- e.insertAdjacentHTML( 'beforeBegin', e.innerHTML ) ;
- e.parentNode.removeChild( e ) ;
- }
- FCKTools.CreateXmlObject = function( object )
- {
- var aObjs ;
- switch ( object )
- {
- case 'XmlHttp' :
- aObjs = [ 'MSXML2.XmlHttp', 'Microsoft.XmlHttp' ] ;
- break ;
- case 'DOMDocument' :
- aObjs = [ 'MSXML2.DOMDocument', 'Microsoft.XmlDom' ] ;
- break ;
- }
- for ( var i = 0 ; i < 2 ; i++ )
- {
- try { return new ActiveXObject( aObjs[i] ) ; }
- catch (e) {}
- }
- }