这个weblogging 设计得比较精巧

源代码在线查看: document.js

软件大小: 7030 K
上传用户: yingyingyingyin
关键词: weblogging 比较
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*
				 * Document.js
				 * A document node in an XML document
				 *
				 * Copyright (C) 2001 David A. Lindquist (dave@gazingus.org)
				 *
				 * This library is free software; you can redistribute it and/or modify
				 * it under the terms of the GNU Lesser General Public License as published by
				 * the Free Software Foundation; either version 2.1 of the License, or
				 * (at your option) any later version.
				 * 
				 * This library is distributed in the hope that it will be useful,
				 * but WITHOUT ANY WARRANTY; without even the implied warranty of
				 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
				 * GNU Lesser General Public License for more details.
				 * 
				 * You should have received a copy of the GNU Lesser General Public License
				 * along with this library; if not, write to the Free Software
				 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
				 */
				
				Document.prototype = new Node();
				Document.prototype.constructor = Document;
				  // Document : Node
				
				function Document() {
				  this.doctype = null;
				  this.implementation = null;
				  this.documentElement = null;
				
				  // inherited from Node
				  this.childNodes = new NodeList();
				  this.nodeName = "#document";
				  this.nodeType = Node.DOCUMENT_NODE;
				  this.ownerDocument = this;
				}
				
				Document.prototype.createAttribute =
				function( name, value ) {
				  return new Attr( this, name, value );
				}
				
				Document.prototype.createCDATASection =
				function( data ) {
				  return new CDATASection( this, data );
				}
				
				Document.prototype.createComment =
				function( data ) {
				  return new Comment( this, data );
				}
				
				Document.prototype.createDocumentFragment =
				function() {
				  return new DocumentFragment( this );
				}
				
				Document.prototype.createElement =
				function( tagName ) {
				  return new Element( this, tagName );
				}
				
				Document.prototype.createEntityReference =
				function( name ) {
				  return new EntityReference( this, name );
				}
				
				Document.prototype.createProcessingInstruction =
				function( target, data ) {
				  return new ProcessingInstruction( this, target, data );
				}
				
				Document.prototype.createTextNode =
				function( data ) {
				  return new Text( this, data );
				}
				
				Document.prototype.getDoctype =
				function() {
				  return this.doctype;
				}
				
				Document.prototype.getDocumentElement =
				function() {
				  return this.documentElement;
				}
				
				Document.prototype.getElementsByTagName =
				function( tagName ) {
				  return new DeepNodeList( this, tagName );
				}
				
				Document.prototype.getImplementation =
				function() {
				  // :REVISIT:
				  return this.implementation;
				}			

相关资源