Baseline Widely available
DOMImplementation.createDocument()
æ¹æ³å建并è¿åä¸ä¸ª XMLDocument
对象ã
doc = document.implementation.createDocument(namespaceURI, qualifiedNameStr, documentType);åæ°
被å建çDOMString
ææ¡£ç namespace URI æ¯ namespace URI ,å¦æææ¡£ä¸å±äºä»»ä½ namespace URI 就为null
.
DOMString
æ¯å¦å
å«è¦åå»ºææ¡£çéå®åç§°ï¼å³å¯éçåç¼ååå·ï¼ä»¥åæ¬å°çæ ¹å
ç´ ã
ææ¡£ç DocumentType
é»è®¤ä¸º null.
var doc = document.implementation.createDocument(
"http://www.w3.org/1999/xhtml",
"html",
null,
);
var body = document.createElementNS("http://www.w3.org/1999/xhtml", "body");
body.setAttribute("id", "abc");
doc.documentElement.appendChild(body);
alert(doc.getElementById("abc")); // [object HTMLBodyElement]
è§è æµè§å¨å
¼å®¹æ§ åè§
DOMImplementation
æ¥å£ãRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4