Iframe与textarea值的传递
将Iframe的值传递给textarea:
<script>
function fun()
{
if (editor.EditMode.checked==true)
document.myform.content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.content.value=editor.HtmlEdit.document.body.innerHTML;
}
</script>
<form method="POST" name="myform" action="#">
<textarea name="content" style="display:none"></textarea>
<iframe ID="editor" src="../editor.asp" frameborder=1 scrolling=no width="600" height="405"></iframe>
<input type="submit" value="GO" οnclick="fun();">
</form>
------------------------------------------------------------------------------------------------------------
将textarea的值传递给Iframe:
<script language="javascript">
function loadForm()
{
editor.HtmlEdit.document.body.innerHTML=document.myform.content.value;
}
</script>
<body onLoad="javascipt:setTimeout('loadForm()',1000);">
……
<form method="POST" name="myform" action="#">
<textarea name="content" ><%=rs("content")%></textarea>
<iframe ID="editor" src="../editor.asp" frameborder=1 scrolling=no width="620" height="405">
<input type="submit" value="GO" >
</form>
……
</body>