java做的页面,文本框里的日期自定义显示OK。但是当要提交更改,会出现错误。
<SCRIPT   RUNAT=SERVER   LANGUAGE=VBSCRIPT>  
 function   DoDateTime(str,   nNamedFormat,   nLCID)				 
 dim   strRet						 
 dim   nOldLCID						 
 strRet   =   str								If   (nLCID   >    -1)   Then						oldLCID   =   Session.LCID						End   If							 
 	On   Error   Resume   Next						If   (nLCID   >    -1)   Then						Session.LCID   =   nLCID					End   If							 
 	If   ((nLCID    <   0)   Or   (Session.LCID   =   nLCID))   Then		 
                            strRet   =   FormatDateTime(str,   nNamedFormat)			 
 	End   If								If   (nLCID   >    -1)   Then							Session.LCID   =   oldLCID				 
 	End   If							 
 	DoDateTime   =   strRet					End   Function							 </SCRIPT> 		    '这段是dreamweaver自动生成的。	 
 ******************************************************************** 
  <input   type= "text "   name= "textfield "   value= " <%=   DoDateTime((Recordset1.Fields.Item( "faultdate ").Value),   2,   -1)   %>   <%=   DoDateTime((Recordset1.Fields.Item( "faultdate ").Value),   4,   -1)   %>  "/>  
 ------------------------------- 
 这样写达到了我的要求,网页中显示出来的是:2007-3-21   15:20 
 但是这个表单内还有其他的文本框,当我修改其他内容后,点击提交。就会出现错误。但是如果我将上面的这个文本框的值,复制一下,在粘帖一下,在修改别的内容,再提交表单,一切正常。如果我不复制粘帖上面文本框里的内容,点击提交按钮,就会出现“应用程序目前操作所使用的值的类型不正确。”
------解决方案--------------------帮顶,接分 呵呵