JSP页面怎么得到服务器时间啊放在JS里的。 <javascript>...if(confirm("您确定上传"+这里需要得到服务器的时间+"个月的库存数据?")){我用<% java.util.date这样怎么老出错 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 直接用肯定报错啊。现在页面上方定义好变量,然后直接使用<% java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd"); java.text.SimpleDateFormat timeFormat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); java.util.Date currDate = new java.util.Date(); String currentDate = dateFormat.format(currDate); String currentTime = timeFormat.format(currDate); System.out.println(currentDate + "/当前日期"); System.out.println(currentTime + "/当前时间");%>if(confirm("您确定上传<%=currentDate%>个月的库存数据?")){ 一个关于http报文的问题 logic标签循环输出的问题 Js 文件外部引用 不行 用内部框架连接本地数据库出错 如何用Myeclipse把java servlet编译成class形式 java抓取被拒绝 初学者求救。。 jsp连接sql server 2000问题 邮件中文附件名乱码的问题请教 这样的验证码如何作呢?? struts2 单选框问题 急。。。js调用OCX怎么输出参数为BSTR的数据
<%
java.text.SimpleDateFormat dateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd");
java.text.SimpleDateFormat timeFormat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
java.util.Date currDate = new java.util.Date();
String currentDate = dateFormat.format(currDate);
String currentTime = timeFormat.format(currDate);
System.out.println(currentDate + "/当前日期");
System.out.println(currentTime + "/当前时间");
%>if(confirm("您确定上传<%=currentDate%>个月的库存数据?")){