Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IE innerHTML strips quote characters.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
01073392
Message ID:
01075657
Vues:
50
Hi,

>This one will not:
<?xml version="1.0"?><A id="BTAG" onclick=myfunction()>Rewrite Function</A>
>
Hardly surprising<g>. Actually .outerHTML makes it worse than that - it strips the quotes from all the attributes. All I can suggest is ugly but does the job:
var XMLHTML= document.anchors("ATAG").outerHTML ;
for (oA in document.getElementById("ATAG").attributes){
   if (oA.specified){
   XMLHTML = XMLHTML.replace(oA.value,"'"+oA.value+"'");
   };
};
//Test
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.loadXML('<?xml version="1.0" ?>'+XMLHTML);
HTH,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform