موضوع: كود تقويم جميل جدا السبت يوليو 31, 2010 9:31 pm
كود تقويم مميز وجميل
مثال ::>>
الكود ::>>
الكود:
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <SCRIPT LANGUAGE="JavaScript"> <!-- Hide //للمزيد من الجافا سكريبت .. نرجو زيارة معهد ديالى التطويري http://diyalaa.yoo7.com // define variables var month_names = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); var days_in_month = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); var this_date = new Date(); // get todays date var this_day = this_date.getDate(); // returns date within month - range 1-31 var this_month = this_date.getMonth(); // returns month within year - range 0-11 function makeCalendar(the_month, the_year) { first_of_month = new Date(the_year, the_month, 1); // creates instance of date object for first of month day_of_week = first_of_month.getDay(); // returns day within week - range 0-6 if (((the_year % 4 == 0) && (the_year % 100 != 0)) || (the_year % 400 == 0)) { days_in_month[1] = 29; // it's a leap year so change # days in Feb in array } else { days_in_month[1] = 28; // not leap year - future use if multi year calendar built } document.write("<TABLE CALLSPACING=0 CELLPADDING=0>"); // start building the month table document.write("<TR BGCOLOR='#FFCC99'><TH COLSPAN=7>" + month_names[the_month] + " " + the_year); // month and year heading document.write("<TR BGCOLOR='#FF8888'><TH>S</TH><TH>M</TH><TH>T</TH><TH>W</TH><TH>T</TH><TH>F</TH><TH>S</TH></TR>"); // day of week heading document.write("<TR ALIGN=RIGHT>"); var column = 0; for (i=0; i<day_of_week; i++) // skip to day_of_week value for first_of_month { document.write("<TD> </TD>"); column++; } for (i=1; i<=days_in_month[the_month]; i++) { if ((i == this_day) && (the_month == this_month) && (the_year == this_year)) { document.write("<TD BGCOLOR='#CC0000'><B>" + i + "</B></TD>"); // highlite todays date } else { document.write("<TD BGCOLOR='#33CCFF'><B>" + i + "</B></TD>"); // no highlite for other dates } column++; if (column == 7) // start next row of dates for month { document.write("</TR><TR ALIGN=RIGHT>"); column = 0; } } document.write("</TR></TABLE>"); // month complete - close table } function y2K(number) // if year < 2000 javascript gives only 2 digits for year { return (number < 1000) ? number + 1900 : number; } var this_year = y2K(this_date.getYear()); // --> </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> <!-- document.write("<TABLE BORDER='1'><TR VALIGN=TOP><TD>"); makeCalendar(0, this_year); // we are passing the month and year to build the calendar document.write("</TD><TD>"); // in JavaScipt the first month is 0 makeCalendar(1, this_year); document.write("</TD><TD>"); makeCalendar(2, this_year); document.write("</TD><TD>"); makeCalendar(3, this_year); document.write("</TD></TR><TR VALIGN=TOP><TD>"); makeCalendar(4, this_year); document.write("</TD><TD>"); makeCalendar(5, this_year); document.write("</TD><TD>"); makeCalendar(6, this_year); document.write("</TD><TD>"); makeCalendar(7, this_year); document.write("</TD></TR><TR VALIGN=TOP><TD>"); makeCalendar(8, this_year); document.write("</TD><TD>"); makeCalendar(9, this_year); document.write("</TD><TD>"); makeCalendar(10, this_year); document.write("</TD><TD>"); makeCalendar(11, this_year); document.write("</TD></TR></TABLE>"); document.close(); // --> </SCRIPT>
لطلبات الاشراف من من هنا♦♦ الاتصال بمدير الموقع من هنا
عدل سابقا من قبل علاء حسين الربيعي في الأحد مايو 03, 2020 12:52 am عدل 2 مرات (السبب : ترتيب الموضوع)
علاء الربيعي
مؤسس الموقع
معلومات اضافية
تاريخ التسجيل : 27/01/2010
عدد المساهمات : 2711
جنسيتي :
الجنس :
البلد : العراق
نقاط النشاط : 2147744097
موضوع: رد: كود تقويم جميل جدا السبت يونيو 23, 2012 7:53 pm
لطلبات الاشراف من من هنا♦♦ الاتصال بمدير الموقع من هنا
علاء حسين الربيعي
مؤسس الموقع
معلومات اضافية
تاريخ التسجيل : 26/01/2010
عدد المساهمات : 7288
جنسيتي :
الجنس :
البلد : العراق
نقاط النشاط : 333327
موضوع: رد: كود تقويم جميل جدا الأحد مايو 03, 2020 12:55 am
تم تجديد الكود 2020
لطلبات الاشراف من من هنا♦♦ الاتصال بمدير الموقع من هنا