几小段代码

 If request.ServerVariables("REQUEST_METHOD") = "POST" Then

 

日期1: < input type = " text "  id = " text1 "  value = " 2006-7-8 " >
日期2:
< input type = " text "  id = " text2 "  value = " 2007-8-5 " >

< input type = " button "  onclick = " Compare(); "  value = " 比较 " >

< script language = " javascript " >
function  Compare() {
alert(strToDate(text1.value) 
> strToDate(text2.value));
}



function  strToDate(str)
{
  
var arys= new Array();
  arys
=str.split('-');
  
var newDate=new Date(arys[0],arys[1],arys[2]); 
  
return newDate;
}
 

script >

 

 

< INPUT type = " checkbox "  VALUE = " 需要 "  id = checkbox1 name = checkbox1  < % if   trim (con( " project_first " )) = " 需要 "   then  % >  checked readonly < % end   if % >> 试压

 

这样的,共有四个文本框,在输入第一第二第三文本的值后,一离开第三个输入文本框,就会自动计算出第四个文本框的值...

第四个文本框:volume=length*width*height
第一个文本框:length
第二个文本框:width
第三个文本框:height

< input  type ="text"  onblue ="去调用计算的函数吧" >

 

 

你可能感兴趣的:(WEB)