zoukankan      html  css  js  c++  java
  • jsp用js写时间

    todayDate = new Date(); 
    date = todayDate.getDate(); 
    month= todayDate.getMonth() +1; 
    year= todayDate.getYear(); 
    document.write(""); 
    if(navigator.appName == "Netscape") 
    { 
    document.write(1900+year); 
    document.write("年"); 
    document.write(month); 
    document.write("月"); 
    document.write(date); 
    document.write("日"); 
    document.write(" ") 
    } 
    if(navigator.appVersion.indexOf("MSIE") != -1) 
    { 
    document.write(year); 
    document.write("年"); 
    document.write(month); 
    document.write("月"); 
    document.write(date); 
    document.write("日"); 
    document.write(" ") 
    } 
    if (todayDate.getDay() == 5) document.write("星期五") 
    if (todayDate.getDay() == 6) document.write("星期六") 
    if (todayDate.getDay() == 0) document.write("星期日") 
    if (todayDate.getDay() == 1) document.write("星期一") 
    if (todayDate.getDay() == 2) document.write("星期二") 
    if (todayDate.getDay() == 3) document.write("星期三") 
    if (todayDate.getDay() == 4) document.write("星期四") 
    document.write(" ") 
    //document.write(+todayDate.getHours()+":"+todayDate.getMinutes()+":"+todayDate.getSeconds());


    如:http://www.fyxt.cn/的时间
  • 相关阅读:
    什么是缓存?
    什么是反射?
    Nginx配置文件详解
    数据库插入,修改出现中文乱码解决办法
    hadoop的HA机制+zookeeper
    cascading--wordcount
    心情3
    完成用户登录注册功能
    感慨1
    Swing程序设计-初级
  • 原文地址:https://www.cnblogs.com/lcuzhanglei/p/2611692.html
Copyright © 2011-2022 走看看