dateObj.getDay() 0-6 sunday=0

解决方案 »

  1.   

    var d = new Date();
    alert(d.getDay());
      

  2.   

    <%select case weekday(date)
    case 1
    str="星期日"
    case 2
    str="星期一"
    case 3
    str="星期二"
    case 4
    str="星期三"
    case 5
    str="星期四"
    case 6
    str="星期五"
    case 7
    str="星期六"
    end select
    response.Write str
    %>
      

  3.   

    <SCRIPT LANGUAGE="JavaScript">
    Date.prototype.getChineseDay = function() {
    var s = "日一二三四五六";
    return ("星期"+s.charAt(this.getDay()));
    }
    alert(new Date().getChineseDay());
    </SCRIPT>