You are here
                    
                                          
web站点常用js
                                                                                
              
    
    
  
    
    
      
      星期六, 2014-08-16 09:35 — shiping1
  
  
    分类: JavaScript2011-12-02 16:25 209人阅读  收藏 举报 - <script>  
 - function checkForm(inputName)  
 - {  
 -     if(inputName.member_no.value=="")  
 -     {  
 -         alert("请您输入学员编号 ! ");  
 -         inputName.member_no.focus();  
 -         return false;  
 -     }  
 -     if(inputName.member_name.value=="")  
 -     {  
 -         alert("请您输入学员编号 ! ");  
 -         inputName.member_name.focus();  
 -         return false;  
 -     }  
 -       
 -     if(confirm("您确认要进行操作嘛 ? ")==true)  
 -     {  
 -         return true;  
 -     }  
 -     else  
 -     {  
 -         return false;  
 -     }  
 -       
 - }  
 - </script>  
 -   
 - <form action="#" method="post" target="_self" onsubmit="return checkForm(this);">  
 -   <p>学员编号:  
 -     <input type="text" name="member_no" />  
 -   </p>  
 -   <p>    <br />  
 -     姓名:<input type="text" name="member_name" />  
 -   </p>  
 -   <p>  
 -     <input type="submit" value="提 交" />  
 -       <input type="reset" value="重 置" />  
 -   </p>  
 - </form>  
 
来自 
http://blog.csdn.net/stellaah/article/details/7035461