<script src="edit.js" type="text/javascript"></script>
<form name="form1" method="post" action="">
<table width="800" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><? include"eokedit.php" ?></td>
</tr>
<tr>
<td><div align="left">
<script language="javascript">
document.write ('<iframe src="textbox.php" id="message" width="550" height="350"></iframe>');
frames.message.document.designMode = "On";
</script>
</div></td>
</tr>
<tr>
<td>
<input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>没有输入框,怎么可以得到值呢?最好加一个<textarea id="code"></textarea>
JS的写法也不兼容...最好写成兼容的
window.onload=function(){
window.frames["message"].document.designMode="on";
}
然后在提交的时候用
document.getElementById("code").value=window.frames["message"].document.body.innerHTML;
就差不多了!
本人不懂PHP,按照JS的写法应该是这样!
<form name="form1" method="post" action="">
<table width="800" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><? include"eokedit.php" ?></td>
</tr>
<tr>
<td><div align="left">
<script language="javascript">
document.write ('<iframe src="textbox.php" id="message" width="550" height="350"></iframe>');
frames.message.document.designMode = "On";
</script>
</div></td>
</tr>
<tr>
<td>
<input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>没有输入框,怎么可以得到值呢?最好加一个<textarea id="code"></textarea>
JS的写法也不兼容...最好写成兼容的
window.onload=function(){
window.frames["message"].document.designMode="on";
}
然后在提交的时候用
document.getElementById("code").value=window.frames["message"].document.body.innerHTML;
就差不多了!
本人不懂PHP,按照JS的写法应该是这样!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货