I want to load a xml file using the javascript. I use the following code to load the xml file. The below coding loads the xml file when it is in the same folder.
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET",'dineshkani.xml',false);
xmlhttp.send();
xmlDocument=xmlhttp.responseText;
alert("loaded");
But i want to load the xml file in the particular location eg. c:/xml/dineshkani.xml
If i use the coding xmlhttp.open("GET",'c:/xml/dineshkani.xml',false);
like this it wont load the xml file. Is there a way to load the xml file.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…