如何在javascript中判断文本框中的日期不能大于当前日期吗?我的怎么不行
 function CheckDate()
    {
        //获得当前时间
        var now = new Date();
        strYear = now.getYear();
        strMonth = now.getMonth();
        strDay = now.getDay();
        var datetime = strYear +"-"+strMonth+"-"+strDay
        var BirDate = document.getElementById("ctl00$mainContent$txtBirDate");      
        if(Trim(BirDate.value)>datetime.toString())
        {
            BirDate.value="";
            document.getElementById("ctl00$mainContent$txtBirDate").focus();
        }
    }