<form name="form3" action="cili.asp" method="post">  <table width="490" border="0" align="center" cellpadding=" function ConfirmIsNull() { if(document.getElementById ("xinxi").value=="" ) { alert ("标题不能为空!"); return false ; } }
 <form name="form3" action="cili.asp" method="post" onsubmit="ConfirmIsNull()">  <script>  function ConfirmIsNull() { if(document.getElementById ("xinxi").value=="" ) { alert ("标题不能为空!"); return false ; } } </script>

解决方案 »

  1.   

     <form name="form3" action="cili.asp" method="post" onsubmit="ConfirmIsNull()">  <script>  
    function ConfirmIsNull() { if(document.getElementById ("xinxi").value=="" ) { alert ("标题不能为空!"); return false ; } } </script>
      

  2.   

    onsubmit="return ConfirmIsNull()"
      

  3.   


    <form name="form3" action="cili.asp" method="post">  <table width="490" border="0" align="center" cellpadding=" function ConfirmIsNull() { if(document.getElementById ("xinxi").value=="" ) { alert ("标题不能为空!"); return false ; } }
     <form name="form3" action="cili.asp" method="post" onsubmit="return ConfirmIsNull()">  <script>  function ConfirmIsNull() { if(document.getElementById ("xinxi").value=="" ) { alert ("标题不能为空!"); return false ; } } </script>
      

  4.   


    onsubmit="return ConfirmIsNull()"其他的不变
      

  5.   

    onsubmit="return ConfirmIsNull()"function ConfirmIsNull(){
    if(document.getElementById ("xinxi").value==""){
    alert ("标题不能为空!");
    return false ;
    }
    return true;
    } </script><form name="form3" action="cili.asp" method="post" onsubmit="return ConfirmIsNull()">
    <input type="text" id="xinxi"><input type="submit" >
    </form>