Forum de discussion
Forum « Programmation Javascript » (archives)
Re: probleme iframe
Envoyé: 28 novembre 2003, 8h47 par Oznog
Essai comme ça :
var chaine = iBody.document.body.innerHTML;
Code complet :
<html>
<head>
<script type="text/javascript" language="javascript">
<!--
function document.onreadystatechange() {
iBody.document.designMode = "On";
}
function twTransEdit(_form) {
alert(iBody.document.body.innerText+'\n'+iBody.document.body.innerHTML);
chaine = iBody.document.body.innerHTML;
_form.TEXTE.value=chaine;
return false;
}
// -->
</script>
</head>
<body>
<form name="monform" action="" onSubmit="return twTransEdit(this)">
<iframe id="iBody" name="iBody" src="about:blank"></iframe>
<input type="hidden" name="TEXTE">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
Ciao
Oznog
Réponses
|