1.
对于文本中不能输入的问题可能是你Js的代码写的。
2
<script src="Stockcontrol/Canlendar.jsp"> </script> 
<% 
   if(riqi==null) 
   { 
String date=new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime()); 
%> 
     <input type="text" name="riqi" value=" <%=date %>"/><img src='xx.jpg'  onfocus="calendar()" /> 
<% 
   } 
   else 
   { 
%> 
     <input type="text" name="riqi" value=" <%=riqi %>"/><img src='xx.jpg'  onfocus="calendar()" /> 
<% 
   } 
%>

解决方案 »

  1.   

     <input type="text" name="riqi" value=" <%=riqi %>"/> <input type="button" onclick="calendar()" value="选择日期"/>try
      

  2.   

    参见:
    JKHtml\JKValidation\JKValidationDemo-SoftAlertWhenBlur.htm
    包括:日历输入格式验证及自动加上日历图片(点击出现日历)
    下载地址:
    http://download.csdn.net/source/346399
      

  3.   

    我试过了楼上的各种方法觉得问题出在我的calendar.js里了
    请问哪位有能够制定返回日期到某个空间的日期选择器阿?
    比如 onclick="calendar('riqi')"就可以返回日期到id=riqi的空间中。
    谢谢