<html>
<head>
<title>使iframe处于编辑状态</title>
</head>
<body>
<iframe id="ifr" width="100%" height="500px"></iframe>
</body>
<script type="text/javascript">
function toggle()
{
var doc=document.getElementById('ifr');
var cstatus = doc.contentWindow.document.designMode.toLowerCase(); //当前编辑状态
if (cstatus=='on')
cstatus = 'off';
else
cstatus='on';
doc.contentWindow.document.designMode=cstatus;
}
toggle();
</script>