var mydate = new Date();
var iweeken= ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]
document.write("今天是阳历:"+mydate.getFullYear() + "年" + mydate.getMonth() + "月" + mydate.getDay() + "日" + weekend[mydate.getDay()]+"<br />");
//通过javascript的日期对象来得到当前的日期,并输出。
你变量写错了,iweeken,weekend,获取日的方法是mydate.getDate();mydate.getDay()是获取星期下标的方法;