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 29 30 31 32 33
|
<HTML>
<HEAD>
<script type="text/JavaScript">
function valider(obj){
var im = document.getElementById("Formulaire").getElementsByTagName('input');
var val="";
for(i=0;i<im.length-1;i++){
val=val +"< "+ im[i].id + ">" + document.getElementById(im[i].id).value+"< /"+im[i].id +"><br>";
}
var Popup=window.open("test.xml","PopUp","width=500,height=350,location=no,status=no,toolbar=no,scrollbars=no");
Popup.document.write(val);
}
</script>
</HEAD>
<BODY>
<div id="Formulaire">
<form action="#" id onsubmit="return valider(this);">
Champ 1: <input type="text" id="texte_1"><br>
Champ 2: <input type="text" id="texte_2"><br>
<input type="BUTTON" name="btnSave" value="Enregistrer" onclick="valider(this);">
</form>
</div>
</BODY>
</HTML> |