EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

createElementNS method

Creates an element from the specified namespace.

Document Object Model (DOM) Level 3 Core Specification, Section 1.4Internet Explorer 9

Syntax

var newElem = document.createElementNS(pvarNS, bstrTag);

Parameters

pvarNS [in]

Type: Variant

A String value that specifies the URI of the desired namespace.

bstrTag [in]

Type: String

A String value that contains the name of the desired element.

newElem [out, retval]

Type: HTMLElement

A reference to the HTMLElement object that contains the new element.

Return value

Type: HTMLElement

A reference to the HTMLElement object that contains the new element.

Standards information

Remarks

The createElementNS method is supported only for XML namespaces.

Examples

The following code example creates a circle element from the SVG namespace.


var sNamespace = "http://www.w3.org/2000/svg";
var oCircle = document.createElementNS( sNamespace, "circle" );

See also

document

 

 

표시:
© 2014 Microsoft