代码太乱了,不想改具体实现就是自己写一个提交的方法,然后在这个方法里面判断

解决方案 »

  1.   

    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <table width="587" border="0" align="center" cellpadding="1" cellspacing="1">
                                              <tr> 
                                                <td width="583"> 
                                                  <div align="center"> 
            <p>标题<br>
              <input name="textfield" type="text" size="80">
            </p>
            <p><select name="selectFont"  class="wenbenkuang" onChange="FormatText('fontname', selectFont.options[selectFont.selectedIndex].value);document.form1.selectFont.options[0].selected = true;"  style="font-family: 宋体; font-size: 9pt" onMouseOver="window.status='选择选定文字的字体。';return true;" onMouseOut="window.status='';return true;">
              <option>选择字体</option>
              <option value="宋体">宋体</option>
              <option value="楷体_GB2312">楷体</option>
              <option value="新宋体">新宋体</option>
              <option value="黑体">黑体</option>
              <option value="隶书" selected>隶书</option>
              <option value="仿宋体">仿宋体</option>
              <option value="幼圆">幼圆</option>
              <OPTION value="Andale Mono">Andale Mono</OPTION>
              <OPTION value=Arial>Arial</OPTION>
              <OPTION value="Arial Black">Arial Black</OPTION>
              <OPTION value="Book Antiqua">Book Antiqua</OPTION>
              <OPTION value="Century Gothic">Century Gothic</OPTION>
              <OPTION value="Comic Sans MS">Comic Sans MS</OPTION>
              <OPTION value="Courier New">Courier New</OPTION>
              <OPTION value=Georgia>Georgia</OPTION>
              <OPTION value=Impact>Impact</OPTION>
              <OPTION value=Tahoma>Tahoma</OPTION>
              <OPTION value="Times New Roman" >Times New Roman</OPTION>
              <OPTION value="Trebuchet MS">Trebuchet MS</OPTION>
              <OPTION value="Script MT Bold">Script MT Bold</OPTION>
              <OPTION value=Stencil>Stencil</OPTION>
              <OPTION value=Verdana>Verdana</OPTION>
              <OPTION value="Lucida Console">Lucida Console</OPTION>
            </select>
              <select language="javascript"  class="wenbenkuang"  id="FontSize" title="字号大小" onChange="FormatText('fontsize',this[this.selectedIndex].value);" name="select" onMouseOver="window.status='选择选定文字的字号大小。';return true;" onMouseOut="window.status='';return true;">
                                                    <option class="heading" selected>字号 
                                                    <option value="7">一号 
                                                    <option value="6">二号 
                                                    <option value="5">三号 
                                                    <option value="4">四号 
                                                    <option value="3">五号 
                                                    <option value="2">六号 
                                                    <option value="1">七号</option>
                                                  </select>
                                                  <input onClick="setMode(this.checked);" name="viewhtml" type="checkbox" value="ON">
                                                  查看HTML源代码<br>
               <br>
            </p>
          </div></td>
                                              </tr>
                                              
      <tr> 
        <td align="center">内容 <br>
          <script language="javascript">
         document.write ('<iframe src="textbox1.asp" id="message" width="650" height="280" align=center></iframe>')
                    frames.message.document.designMode = "On";
                    </script> </td>
                                              </tr>
                                              <tr> 
                                                <td align="center"> 
                                                  <input type="button" value=" 返 回 " onClick="javascript:history.go(-1)"  class="go-wenbenkuang" name="button">
                                                     
                                                  <input type="submit" value=" 修 改 " name="Submit"  class="go-wenbenkuang" onClick="document.form1.Content.value = frames.message.document.body.innerHTML;" onClick="return checktitle();">
                                                    
                                                  <input type="reset" value=" 清 除 " name="Reset"  class="go-wenbenkuang">
                                                  <input type="hidden" name="Content" value="">
                                                </td>
                                              </tr>
    </table>
       <div align="center"></div>
    <script language="javascript">
     function checktitle(){
        if (document.form.title.value==null){
    alert("The title is not null!");
    return false;
    }
    return true;
     }
    </script>====CSDN 小助手 V2.5 2005年11月05日发布====
    CSDN小助手是一款脱离浏览器也可以访问Csdn论坛的软件
    界面:http://blog.csdn.net/Qqwwee_Com/archive/2005/11/05/523395.aspx
    下载:http://szlawbook.com/csdnv2