이 IE에서 작동하지만, 파이어 폭스에서 매우 이상하다 :iframe이 대해 designMode
정상적으로를 열면 파이어 폭스의 대해 designMode가 작동하지 않는 경우,하지만 난
에 중단 점을 넣어 경우 this.editor.contentWindow.document.designMode = "설정";
라인을 입력 한 다음 해제 한 다음에는 해제 한 후 디자인 모드가 작동합니다.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
TheEditor = function() {
this.editor = null;
this.mainDiv=document.getElementById("mainDiv");
}
TheEditor.prototype = {
InitializeEditor: function() {
this.editor=document.createElement('iframe');
this.editor.frameBorder=1;
this.editor.width = "500px";
this.editor.height="250px";
this.mainDiv.appendChild(this.editor);
this.editor.contentWindow.document.designMode = "On";
}
}
window.onload = function(){
obj = new TheEditor;
obj. InitializeEditor();
}
</script>
</head>
<body>
<div id="mainDiv">
</div>
</body>
</html>