2001-09-26 02:43:09 +04:00
|
|
|
/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1998-04-14 22:16:23 +04:00
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
var node = document.documentElement
|
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
node.nodeType
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
node.tagName
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
var attrList = node.attributes
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
attrList.length
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-04-17 05:32:07 +04:00
|
|
|
var attr = attrList.item(0)
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
attr.name
|
1998-04-14 00:24:54 +04:00
|
|
|
|
|
|
|
attr.value
|
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
node.hasChildNodes
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
var children = node.childNodes
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
children.length
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
node = children.item(1);
|
|
|
|
node.nodeType
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
node.tagName
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
node = node.firstChild
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
node = node.nextSibling
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-07-14 22:44:44 +04:00
|
|
|
node = node.parentNode
|
1998-04-14 00:24:54 +04:00
|
|
|
|
1998-04-14 22:16:23 +04:00
|
|
|
|