1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| if( window.ActiveXObject && /Win/.test(navigator.userAgent) )
{
oLoadedXML = new ActiveXObject("Msxml.DOMDocument");
oLoadedXML.async = false;
oLoadedXML.onreadystatechange = function ()
{
if (oLoadedXML.readyState == 4) alert('ok');
}
oLoadedXML.load(xmlFile);
}
else if( document.implementation && document.implementation.createDocument )
{
oLoadedXML = document.implementation.createDocument("","",null);
oLoadedXML.async=false;
var loaded = oLoadedXML.load(xmlFile);
if (loaded)
{
alert('ok');
}else{
alert('erreur');
}
}
else
{
alert("Your browser can\'t handle this script");
return;
} |
Partager