jsp页面获取服务器时间的简单调用示例
内容摘要
Calendar c = Calendar.getInstance();
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH);
int day= c.get(Calendar.DAY);
这三行加在<% %>里面
调
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH);
int day= c.get(Calendar.DAY);
这三行加在<% %>里面
调
文章正文
Calendar c = Calendar.getInstance(); int year = c.get(Calendar.YEAR); int month = c.get(Calendar.MONTH); int day= c.get(Calendar.DAY);
这三行加在<% %>里面
调用时用<%= year %><%= month%><%= day%>
代码注释