首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

SCRIPT中页面时间变成0后如何提交给JAVA文件

2012-02-28 
SCRIPT中页面时间变成0后怎么提交给JAVA文件SCRIPT中页面时间变成0后怎么提交给JAVA文件SCRIPTlanguageJ

SCRIPT中页面时间变成0后怎么提交给JAVA文件
SCRIPT中页面时间变成0后怎么提交给JAVA文件
  <SCRIPT       language=JavaScript>      
    <!--      
    var       now       =       new       Date()      
    function       showtime(){      
                    hours=document.time.face1.value      
    minutes=document.time.face2.value      
    seconds=document.time.face3.value          
    runtime()              
   
    }      
    function       runtime()       {      
    var       h=       ((hours       <       10)       ?       "0 ": " "       )       +       hours      
    var       m=       ((minutes       <       10)       ?       "0 ": " "       )       +       minutes      
    var       s=       ((seconds       <       10)       ?       "0 ": " "       )       +       seconds      
    document.time.face.value       =       h+ ": "+m+ ": "+s      
    if(hours==0&&minutes==0&&seconds==0)   {  
这里要写什么
  }                                          
  else   if(hours> 0||minutes> 0||seconds> 0)   {    
if(minutes==0&&seconds==0){                
minutes=60;
hours--;    
}
if(seconds==0&&minutes!=0){              
seconds=60;
minutes--;    
}                
seconds--;                      
   
}            

          setTimeout( "runtime() "       ,10)                                              
    }                              
 
  -->      
    </SCRIPT>      
               
                            <FORM       name=time       action= "   "       method=post>              


                            <INPUT       size=7       name=face>                      
                            <INPUT       type=hidden       size=4       value=0       name=face1>              
                            <INPUT       type=hidden       size=4       value=5       name=face2>                                
                            <INPUT       type=hidden       size=4       value=0       name=face3>      
               
    </FORM>

[解决办法]
用Ajax

热点排行