HOME > PHP > PHP Forum > อยากได้โค้ดปฏิทินที่สามารถเลือกได้แต่วันจันทร์ค่ะ ไม่ทราบว่าใครพอจะมีปฏิทินที่สามารุเลือกได้แต่วันจันทร์บ้างค่ะ หรือเป็นคำแนะนำก็ได้ค่ะ
<SCRIPT LANGUAGE="JavaScript">
var now = new Date();
var month_array = new Array("มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม");
var show_date = new Date();
var array_day = new Array();
document.write("<form name=date_list><table bgcolor=silver id='table1' style='visibility:hidden'><tr><td>");
document.write("<select name=month onchange=change_month(this.options.selectedIndex)>");
for(i=0;i<month_array.length;i++)
{
if (now.getMonth() != i)
{document.write ("<option value="+i+">"+month_array);}
else
{document.write ("<option value="+i+" selected>"+month_array);}
function set_cal(show_date)
{
begin_day = new Date (show_date.getYear(),show_date.getMonth(),1);
begin_day_date = begin_day.getDay();
end_day = new Date (show_date.getYear(),show_date.getMonth()+1,1);
count_day = (end_day - begin_day)/1000/60/60/24;
input_table(begin_day_date,count_day);
}
set_cal(show_date);
function input_table(begin,count)
{
init();
j=0;
if (begin!=0){i=begin-1;}else{i=6}
for (c=1;c<count+1;c++)
{
colum_name = eval("d"+i+"r"+j);