<input type="button" value="重新编辑" onclick="clean()"/>
<script type="text/javascript">
var i="";
function clean(){
var b=document.getElementById("cws_Composition").contentWindow; //cws_Composition
b.document.body.innerHTML =" ";
i=" ";
}
</script>
本文介绍了一种使用JavaScript来清除网页中特定iframe内所有内容的方法。通过调用document.body.innerHTML属性并将其设置为空字符串,可以有效地清除指定iframe的内容。
8067
2万+

被折叠的 条评论
为什么被折叠?