摘要:
function test(){ d = new Date(); alert(d.getYear()+1900);//第一种 alert(d.getFullYear());//第二种}用这个方法获取年份时是从1900年开始计算的,因此当年份为2015时,得到的结果为115,所以如果要得到最终的年份,... 阅读全文
摘要:
1 Date date1 = new Date(System.currentTimeMillis());//当前时间2 Date date2 = new Date((System.currentTimeMillis()/(24*3600*1000)+1)*(24*3600*1000))//第二天8:... 阅读全文
摘要:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: sun.java2d.HeadlessGraphicsEnvironment cannot be cast to sun.awt.Win32GraphicsEnv... 阅读全文