当前位置: 移动技术网 > IT编程>开发语言>Java > jsp输出当前时间的实现代码

jsp输出当前时间的实现代码

2017年12月08日  | 移动技术网IT编程  | 我要评论

在jsp页面中输出完整的时间,格式为"年 月 日  时:分:秒"

 <% date date = new date(); 
  simpledateformat t = new simpledateformat("yyyy-mm-dd hh:mm:ss");
  string time = t.format(date);
 %>
 当前时间:<%= time %>

以上就是小编为大家带来的jsp输出当前时间的实现代码全部内容了,希望大家多多支持移动技术网~

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网