<script language="javascript">
 
<a onclick="alert('交易所名称输入错误')">
</script>
中间这段不要,是我自己加的!

解决方案 »

  1.   

    if(form.code.value.length!=20)
    {
      alert();
    }
      

  2.   

    <SCRIPT LANGUAGE=vbscript>
    <!--
    function datevalid
      datevalid = false
      if not isdate(InputForm.date1.value) then
        msgbox "日期错误"
        exit function
      end if  if not isdate(InputForm.date2.value) then
        msgbox "日期错误"
        exit function
      end if
      
      if cdate(date2) <= cdate(date1) then
        msgbox "结束日期必须大于开始日期"
        exit function
      end if
      datevalid=true
    end function
    -->
    </script>
      

  3.   

    更正<SCRIPT LANGUAGE=vbscript>
    <!--
    function datevalid
      datevalid = false
      if not isdate(InputForm.date1.value) then
        msgbox "日期错误"
        exit function
      end if  if not isdate(InputForm.date2.value) then
        msgbox "日期错误"
        exit function
      end if
      
      if cdate(InputForm.date2.value) <= cdate(InputForm.date1.value) then
        msgbox "结束日期必须大于开始日期"
        exit function
      end if
      datevalid=true
    end function
    -->
    </script>