Ciao,
ho un problema con innerHtml, riesco a far inserire la stringa che voglio in ogni elemento (p, span, div, ...) tranne che in iframe, dove sto sbagliando?
<html>
<head>
<title>porova</title>
<script type="text/javascript" language="javascript">
function load(){
ApreiFrame("editArea").designMode = "On";
}
function ApreiFrame(iFrameID){
if (document.getElementById(iFrameID).contentDocument ){
//per Mozilla
return document.getElementById(iFrameID).contentDocument;
} else {
//per Internet Explorer
return document.frames[iFrameID].document;
}
}
function Inserisci(){
document.getElementById("editArea").innerHTML="
blabla</p>";
}
</script>
</head>
<body onload="load()">
<iframe src="" id="editArea" width="50%"></iframe>
<input type="button" value="inserisci stringa" id="inserisci" onclick="Inserisci();"/>
</body>
</html>
grazie in anticipo

Rispondi quotando