Comment exploiter une variable contenant de l'HTML ?
Bonjour :P
Je vous explique mon problème : j'aimerais stocker dans une variable javascript un contenu HTML comme suit :
Code:
1 2 3 4 5 6 7 8 9 10
| var bodyCorps = '<HTML><HEAD><TITLE>NewsLetter</TITLE><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />'+
'<style type="text/css">'+
'*{padding: 0px;margin:0px;}hr{ visibility: hidden;}.image{ background: transparent url(\'cid:ENTETE.gif\') no-repeat top center;height:200px;padding-right:8px;padding-top: 90px;}'+
'.bordureDuHaut{background: transparent url(\'cid:BORDURE_haut.gif\') no-repeat top;height:6px;}.fond{background: transparent url(\'cid:FOND_1px.gif\') top;height:569px;font-family:calibri,cambria,arial,candara;color :#000099;}'+
'p{text-align: center;}#texte{padding-left:20px;font-size:130%;}#texteScrollable{position: relative ;width:800 ;height:569;overflow :auto ;font-size: 10pt;}'+
'.bordureDuBas{background: transparent url(\'cid:BORDURE_bas.gif\') no-repeat top;height:6px;}.finDuFond{background: transparent url(\'cid:FOND_1px.gif\') top;height:6px;}'+
'#bouton_send{text-align: center;width:100%;}.logoAirbus{float:right;width:100px;background:white url(\'cid:LOGO_AIRBUS.gif\') no-repeat;height: 24px;}'+
'</style></HEAD><BODY><div class="image"><div align="bottom" class="logoAirbus" ></div></div><div class="fond" id="texteScrollable"><div class="bordureDuHaut">'+
'</div> <div id="texte"><p><b>Dear all,</b></p>'
'</div></div><form method=post action="test.php"><div class="finDuFond"><div class="bordureDuBas"></div></div></form></BODY></HTML>' |
Je voulais savoir s'il était possible d'exploiter ce contenu pour que sa donne forme à de l'HTML. Sachant que je transmet ce paramètre par une requête AJAX. Je sais pas si je me suis bien fais comprendre mais n'hésitez pas si jamais vous ne comprenez pas où vouliez plus de précision. Meric de votre écoute ;)