好像不可能把一个页面放在表单中,
把你放在form1中的情况写出来吧

解决方案 »

  1.   

    我是想把http://fason.nease.net/code/js/other/htmleditor.htm
    加到我的网站的后台管理中,将文章的html源码插入到数据库,
    如果不用表单,还有其他的办法吗?
    谢谢先!
      

  2.   

    不用表单,textarea中的数据怎么传输,可以吗?
    大家怎么都不说了。
      

  3.   

    不需要修改的,frames和form没有任何影响
      

  4.   

    这是源码,我要将其中的textarea中的源码插入都数据库,所以要用到表单,但是加入到表单中后就出错了,谢谢帮助,如果成功了在开贴加分。<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <!-- saved from url=(0051)http://fason.nease.net/code/js/other/htmleditor.htm -->
    <!-- saved from url=(0067)http://lucky.myrice.com/javascriptexam/htmleditor/editor/editor.htm --><HTML><HEAD><TITLE>HTML 编辑器</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <STYLE>BODY {
    FONT-SIZE: 12px; FONT-FAMILY: 细明体
    }
    TD {
    FONT-SIZE: 12px; FONT-FAMILY: 细明体
    }
    BUTTON {
    FONT-SIZE: 12px; FONT-FAMILY: 细明体
    }
    INPUT {
    FONT-SIZE: 12px; FONT-FAMILY: 细明体
    }
    DIV {
    BORDER-RIGHT: #d9cec4 1px solid; BORDER-TOP: #d9cec4 1px solid; BACKGROUND: #d9cec4; BORDER-LEFT: #d9cec4 1px solid; WIDTH: 24px; CURSOR: default; BORDER-BOTTOM: #d9cec4 1px solid; HEIGHT: 20px; TEXT-ALIGN: center; borderColor: #ffffff
    }
    .function {
    WIDTH: 80px
    }
    </STYLE><SCRIPT>
    function BtnOver(btn){
    btn.style.borderTopColor="#efece8";
    btn.style.borderBottomColor="#888070";
    btn.style.borderLeftColor="#efece8";
    btn.style.borderRightColor="#888070";
    }
    function BtnClick(btn){
    btn.style.borderTopColor="#888070";
    btn.style.borderBottomColor="#efece8";
    btn.style.borderLeftColor="#888070";
    btn.style.borderRightColor="#efece8";
    }
    function BtnOut(btn){
    btn.style.borderColor="#d9cec4";
    }
    function doCut(){
    doc.execCommand('Cut');
    Editor.focus();
    }
    function doCopy(){
    doc.execCommand('Copy');
    Editor.focus();
    }
    function doPaste(){
    doc.execCommand('Paste');
    Editor.focus();
    }
    function doUndo(){
    doc.execCommand('Undo');
    Editor.focus();
    }
    function doDelete(){
    doc.execCommand('Delete');
    Editor.focus();
    }
    function doFontName(fn){
    doc.execCommand('FontName', false, fn);
    Editor.focus();
    }
    function doFontSize(fs){
    doc.execCommand('FontSize', false, fs);
    Editor.focus();
    }
    function doBold(){
    doc.execCommand('Bold');
    Editor.focus();
    }
    function doItalic(){
    doc.execCommand('Italic');
    Editor.focus();
    }
    function doUnderline(){
    doc.execCommand('Underline');
    Editor.focus();
    }
    function doStrikeThrough(){
    doc.execCommand('StrikeThrough');
    Editor.focus();
    }
    function doSubscript(){
    doc.execCommand('Subscript');
    Editor.focus();
    }
    function doSuperscript(){
    doc.execCommand('Superscript');
    Editor.focus();
    }
    function doJustifyLeft(){
    doc.execCommand('JustifyLeft');
    Editor.focus();
    }
    function doJustifyRight(){
    doc.execCommand('JustifyRight');
    Editor.focus();
    }
    function doJustifyCenter(){
    doc.execCommand('JustifyCenter');
    Editor.focus();
    }
    function doIndent(){
    doc.execCommand('Indent');
    Editor.focus();
    }
    function doOutdent(){
    doc.execCommand('Outdent');
    Editor.focus();
    }
    function doForeColor(){
    var fcolor=showModalDialog("editor_color.htm",false,"dialogWidth:106px;dialogHeight:126px;status:0;");
    doc.execCommand('ForeColor',false,fcolor);
    Editor.focus();
    }
    function doBackColor(){
    var bcolor=showModalDialog("editor_color.htm",false,"dialogWidth:106px;dialogHeight:126px;status:0;");
    doc.execCommand('BackColor',false,bcolor);
    Editor.focus();
    }
    function doInsertTable(){
    var dotable=showModalDialog("editor_table.htm",false,"dialogWidth:200px;dialogHeight:156px;status:0;");
    if (dotable!=undefined){
    doc.body.innerHTML=doc.body.innerHTML+dotable;
    }else{
    return false;
    }
    Editor.focus();
    }
    function doInsertOrderedList(){
    doc.execCommand('InsertOrderedList');
    Editor.focus();
    }
    function doInsertUnorderedList(){
    doc.execCommand('InsertUnorderedList');
    Editor.focus();
    }
    function doCreateLink(){
    doc.execCommand('CreateLink');
    Editor.focus();
    }
    function doInsertImage(){
    Editor.focus();
    doc.execCommand('InsertImage','xxx');
    }
    function doInsertInputButton(){
    Editor.focus();
    doc.execCommand('InsertInputButton');
    }
    function doInsertHorizontalRule(){
    Editor.focus();
    doc.execCommand('InsertHorizontalRule');
    }
    function doInsertInputCheckbox(){
    Editor.focus();
    doc.execCommand('InsertInputCheckbox');
    }
    function doInsertInputRadio(){
    Editor.focus();
    doc.execCommand('InsertInputRadio');
    }
    function doInsertInputText(){
    Editor.focus();
    doc.execCommand('InsertInputText');
    }
    function doInsertInputPassword(){
    Editor.focus();
    doc.execCommand('InsertInputPassword');
    }
    function doInsertInputSubmit(){
    Editor.focus();
    doc.execCommand('InsertInputSubmit');
    ShowMessage();
    }
    function doInsertInputReset(){
    Editor.focus();
    doc.execCommand('InsertInputReset');
    ShowMessage();
    }
    function doInsertMarquee(){
    Editor.focus();
    doc.execCommand('InsertMarquee');
    ShowMessage();
    }
    function doInsertSelectDropdown(){
    Editor.focus();
    doc.execCommand('InsertSelectDropdown');
    }
    function doInsertTextArea(){
    Editor.focus();
    doc.execCommand('InsertTextArea');
    }
    function doPrint(){
    doc.execCommand('Print');
    Editor.focus();
    }
    function doSaveAs(){
    doc.execCommand('SaveAs',0,"未命名");
    Editor.focus();
    }
    function doOpen(){
    doc.execCommand('Open');
    Editor.focus();
    }
    function EditResource(){
    Preview.value=doc.body.innerHTML;
    return false;
    }
    function ClearAll(){
    doc.body.innerHTML='';
    Preview.value='';
    return false;
    }
    function SeePreview(){
    doc.body.innerHTML=Preview.value;
    return false;
    }
    function AutoPreview(){
    if(vx.checked){
    SeePreview();
    }
    }
    function EditMode(){
    doc.designMode = "On";
    window.setTimeout('SeePreview()',100);
    Preview.focus();
    }
    function PreviewMode(){
    doc.designMode = "Off";
    window.setTimeout('SeePreview()',100);
    Preview.focus();
    }
    function ShowMessage(){
    alert("请按两下物件编辑内容");
    }
    </SCRIPT>
      

  5.   

    <META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
    <BODY onkeyup=AutoPreview(); bgColor=#e0e0e0>
    <CENTER>
    <TABLE cellSpacing=0 borderColorDark=#efece8 cellPadding=0 width=600 
    borderColorLight=#888070 border=1>
      <TBODY>
      <TR>
        <TD bgColor=#d9cec4>
          <TABLE cellSpacing=1 cellPadding=0 border=0>
            <TBODY>
            <TR>
              <TD><IMG src="html_edit_files/editor_h.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=存档 onclick=doSaveAs(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f01.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=列印 onclick=doPrint(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f02.gif"></DIV></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=剪下 onclick=doCut(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f03.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=复制 onclick=doCopy(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f04.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=贴上 onclick=doPaste(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f05.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=删除 onclick=doDelete(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f06.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=复原 onclick=doUndo(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f07.gif"></DIV></TD></TR></TBODY></TABLE></TD></TR>
      <TR>
        <TD bgColor=#d9cec4>
          <TABLE cellSpacing=1 cellPadding=0 border=0>
            <TBODY>
            <TR>
              <TD><IMG src="html_edit_files/editor_h.gif"></TD>
              <TD><SELECT 
                onchange=doFontName(this[this.selectedIndex].value);this.selectedIndex=0;> 
                  <OPTION value="" selected>字型<OPTION value=细明体>细明体<OPTION 
                  value=新细明体>新细明体<OPTION value=标楷体>标楷体<OPTION 
                  value=arial>arial<OPTION 
              value=wingdings>wingdings</OPTION></SELECT></TD>
              <TD><SELECT 
                onchange=doFontSize(this[this.selectedIndex].value);this.selectedIndex=0;> 
                  <OPTION value="" selected>大小<OPTION value=1>1<OPTION 
                  value=2>2<OPTION value=3>3(预设)<OPTION value=4>4<OPTION 
                  value=5>5<OPTION value=6>6<OPTION value=7>7</OPTION></SELECT></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=粗体字 onclick=doBold(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f08.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=斜体字 onclick=doItalic(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f09.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=划底线 onclick=doUnderline(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f10.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=删除线 onclick=doStrikeThrough(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f11.gif"></DIV></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=上标字 onclick=doSuperscript(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f12.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=下标字 onclick=doSubscript(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f13.gif"></DIV></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=文字颜色 onclick=doForeColor(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f14.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=背景颜色 onclick=doBackColor(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f15.gif"></DIV></TD></TR></TBODY></TABLE></TD></TR>
      <TR>
        <TD bgColor=#d9cec4>
          <TABLE cellSpacing=1 cellPadding=0>
            <TBODY>
            <TR>
              <TD><IMG src="html_edit_files/editor_h.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=靠左对  onclick=doJustifyLeft(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f16.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=靠中对  onclick=doJustifyCenter(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f17.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=靠右对  onclick=doJustifyRight(); 
                onmouseout=BtnOut(this);><IMG 
      

  6.   

    src="html_edit_files/editor_f18.gif"></DIV></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=增加缩排 onclick=doIndent(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f19.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=减少缩排 onclick=doOutdent(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f20.gif"></DIV></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=数字标题 onclick=doInsertOrderedList(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f21.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=无数字标题 
                onclick=doInsertUnorderedList(); onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f22.gif"></DIV></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=插入分隔线 
                onclick=doInsertHorizontalRule(); onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f23.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=插入表格 onclick=doInsertTable(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f24.gif"></DIV></TD>
     <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=插入连结 onclick=doCreateLink(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f25.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=插入图片 onclick=doInsertImage(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f26.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=跑马灯 onclick=doInsertMarquee(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f27.gif"></DIV></TD></TR></TBODY></TABLE></TD></TR>
      <TR>
        <TD bgColor=#d9cec4>
          <TABLE cellSpacing=1 cellPadding=0>
            <TBODY>
            <TR>
              <TD><IMG src="html_edit_files/editor_h.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=核取方块 
                onclick=doInsertInputCheckbox(); onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f28.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=点选圆 onclick=doInsertInputRadio(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f29.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=文字输入 onclick=doInsertInputText(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f30.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=密码输入 
                onclick=doInsertInputPassword(); onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f31.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=选单方块 
                onclick=doInsertSelectDropdown(); onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f32.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=文字方块 onclick=doInsertTextArea(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f33.gif"></DIV></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=自订按钮 onclick=doInsertInputButton(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f34.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=送出按钮 onclick=doInsertInputSubmit(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f35.gif"></DIV></TD>
              <TD>
                <DIV onmouseup=BtnOver(this); onmousedown=BtnClick(this); 
                onmouseover=BtnOver(this); title=重设按钮 onclick=doInsertInputReset(); 
                onmouseout=BtnOut(this);><IMG 
                src="html_edit_files/editor_f36.gif"></DIV></TD></TR></TBODY></TABLE></TD></TR>
      <TR>
        <TD bgColor=#d9cec4>
          <TABLE cellSpacing=1 cellPadding=0>
            <TBODY>
            <TR>
              <TD><IMG src="html_edit_files/editor_h.gif"></TD>
              <TD><INPUT title=编辑模式 onclick=EditMode(); type=radio CHECKED 
              name=vm></TD>
              <TD>
                <DIV title=编辑模式><IMG src="html_edit_files/editor_e.gif"></DIV></TD>
              <TD>&nbsp;</TD>
              <TD><INPUT title=预览模式 onclick=PreviewMode(); type=radio name=vm></TD>
              <TD>
                <DIV title=预览模式><IMG 
            src="html_edit_files/editor_p.gif"></DIV></TD></TR></TBODY></TABLE></TD></TR>
      <TR>
        <TD><IFRAME id=Editor 
          style="WIDTH: 100%; HEIGHT: 150px; BACKGROUND-COLOR: white" marginWidth=1 
          src="about:blank"></IFRAME></TD></TR>
      <TR>
        <TD bgColor=#d9cec4>
          <TABLE cellSpacing=1 cellPadding=0>
            <TBODY>
            <TR>
              <TD><IMG src="html_edit_files/editor_h.gif"></TD>
              <TD><BUTTON class=function id=mxh 
                onclick=EditResource();Preview.focus();>编辑源代码</BUTTON></TD>
              <TD><BUTTON class=function 
                onclick=ClearAll();Preview.focus();>全部清除</BUTTON></TD>
              <TD><BUTTON class=function 
                onclick=SeePreview();Preview.focus();>结果预览</BUTTON></TD>
              <TD><IMG src="html_edit_files/editor_s.gif"></TD>
              <TD><INPUT title=自动预览 onclick=AutoPreview();Preview.focus(); 
                type=checkbox CHECKED name=vx></TD>
              <TD>
                <DIV title=自动预览><IMG 
            src="html_edit_files/editor_a.gif"></DIV></TD></TR></TBODY></TABLE></TD></TR>
      <TR>
        <TD><TEXTAREA id=Preview style="OVERFLOW: auto; WIDTH: 100%; HEIGHT: 150px; BACKGROUND-COLOR: #ffffff"></TEXTAREA></TD></TR></TBODY></TABLE></CENTER>
    <SCRIPT>
    var doc;
    doc=document.frames.Editor.document;
    doc.designMode = "On";
    window.setTimeout('Editor.focus()',100);
    </SCRIPT>
    </BODY></HTML>