XML DOM name అంశం
నిర్వచనం మరియు వినియోగం
name name అంశం డిటిడి యొక్క పేరును అందిస్తుంది (DOCTYPE కీలక పదం తర్వాత ఉన్న పేరు).
సంకేతం
documentObject.doctype.name
ఉదాహరణ
ఈ కోడు "note_internal_dtd.xml" ని xmlDoc లోకి లోడ్ చేస్తుంది మరియు DTD యొక్క పేరును ప్రదర్శిస్తుంది:
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
myFunction(this);
}
};
xhttp.open("GET", "note_internal_dtd.xml", true);
xhttp.send();
function myFunction(xml) {
var xmlDoc = xml.responseXML;
document.getElementById("demo").innerHTML =
xmlDoc.doctype.name;
}

