日期:2014-05-20  浏览次数:20395 次

通过日历想文本框输入日期,插入数据库时提示"无效月份"
<script   language= "javascript ">
//日历调用
      var     wName=null;    
      function     begin_Open()    
      {    
              wName=window.showModalDialog( "calendar.htm ", " ", "dialogWidth:305px;DialogHeight=302px;scroll:no;help=no;status=no ");    
              if(wName!=null)
      center.begin_date.value=wName;    

      }
            function     end_Open()    
      {      
              wName=window.showModalDialog( "calendar.htm ", " ", "dialogWidth:305px;DialogHeight=302px;scroll:no;help=no;status=no ");
              if(wName!=null)    
      center.end_date.value=wName;    
      }    
</script>

<TD   bgColor= "#ffffde "> <SPAN   class= "note "> 开始日期   <asp:textbox   id= "begin_date "   onclick= "begin_Open() "   runat= "server "   Width= "80px "   ReadOnly= "True "   name= "begin_date "> </asp:textbox>

------解决方案--------------------
打开对话框返回后文本框中是什么内容?插入代码是怎么写的?
------解决方案--------------------
你断点查看一下有没有返回日期值,没有返回的话是会出错的
------解决方案--------------------
看不到你提交的代码
如果说是在显示calendar.htm提示的话证明wName不能为null
------解决方案--------------------
可能是两台机器上的文字编码有问题吧...应该只可能因为这个了...