87,910
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<head>
<script>
var ed = null;
var cd = null;
window.onload = function() {
var o = document.getElementById("ss");
ed = document.all?o.contentWindow.document:o.contentDocument;
ed.open();
ed.write('<html><head><style>body{margin:5px;font:14px;word-wrap:break-word}</style></head><body id="my_body">232</body></html>');
ed.close();
ed.contentEditable = true;
ed.designMode = 'on';
//////////////////////////////////////////////////////
};
function ss(){
alert(ed.body.innerHTML)
ed.body.appendChild(document.createElement("hr"))
}
</script>
</head>
<BODY>
<IFRAME id="ss" height="200" src="about:blank" width="200" ></IFRAME>
<input value="add" type="button" onclick="ss()" />
<hr>
</BODY></HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<head>
<script>
var ed = null;
var cd = null;
window.onload = function() {
var o = document.getElementById("ss");
ed = document.all?o.contentWindow.document:o.contentDocument;
ed.open();
ed.write('<html><head><style>body{margin:5px;font:14px;word-wrap:break-word}</style></head><body id="my_body">232</body></html>');
ed.close();
ed.contentEditable = true;
ed.designMode = 'on';
//////////////////////////////////////////////////////
};
function ss(){
alert(ed.body.innerHTML)
ed.body.appendChild(ed.createElement("hr"))
}
</script>
</head>
<BODY>
<IFRAME id="ss" height="200" src="about:blank" width="200" ></IFRAME>
<input value="add" type="button" onclick="ss()" />
<hr>
</BODY></HTML>
function ss(){
alert(ed.body.innerHTML)
ed.body.appendChild(ed.createElement("hr"))
}