Trio ȨÆäÀÌÁö ´Þ·Â ¸¸µé±â ¿¹Á¦ Javascript ¿¹Á¦ ¸ÞÀÎÆäÀÌÁö


HTML Code
<!doctype html public "-//w3c//dtd html 4.01 transitional//en"> <html lang="ko"> <head> <title>Trio ȨÆäÀÌÁö - ´Þ·Â ¸¸µé±â ¿¹Á¦ - Javascript ¿¹Á¦</title> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=EUC-KR"> <meta name="keywords" content="javascript,js,..."> <script Language="Javascript" src="../../pub/pubcss.js"></script> <script Language="Javascript">basicset(2,'std')</script> ¾ÕºÎºÐÀÇ javascript´Â ÅëÀÏµÈ ¾ç½ÄÀ» °°°Ô Çϱâ À§ÇÑ °ÍÀ¸·Î ÀÌ ¿¹Á¦ÀÇ ³»¿ë°ú´Â º° °ü·ÃÀÌ ¾ø½¿ <script Language="Javascript"> <!-- °¨Ãã function calendar(){ monthdays='312831303130313130313031' weekdays='ÀÏ¿ùÈ­¼ö¸ñ±ÝÅä' now=new Date(); // ÇöÀç ÀÏÀÚ, ½Ã°£ day=now.getDate(); // ÀÏÀÚ wkdy=now.getDay(); // ¿äÀÏ (0=¿ù¿äÀÏ, 1=È­¿äÀÏ, ...) month=now.getMonth(); // ¿ù (0=1¿ù, 2¿ù=1, ....) year=now.getYear(); // ³â startday=now // ÇöÀç ÀÏÀÚ, ½Ã°£ º¹»ç startday.setDate(1); // º¹»çµÈ ÀÏÀÚ, ½Ã°£¿¡ ÀÏÀÚ¸¦ 1ÀÏ·Î ¼³Á¤ wkdy1=startday.getDay(); // 1ÀÏÀÇ ¿äÀÏÀº ¾òÀ½ monthEnd=monthdays.substring((month*2),(month*2+2)) // µÎÀÚ¸®¾¿ ²÷¾î ¿ù ±æÀÌ·Î if ((month==1)&& // ¿ùÀÌ 2¿ù(1)À̸ç, (((year %4==0)&&(year %100 !=0)) // (4¿Í 100À¸·Î ³ª´² ³ª¸ÓÁö°¡ ¾ø°Å³ª || (year % 400 ==0 ))) monthEnd=29; // 400À¸·Î ³ª´² ³ª¸ÓÁö°¡ ¾øÀ¸¸é) 29 document.write('<tr align=center><td colspan=7 class=week>'); document.write('<font size=4 color=880000><b>'); document.write(year+' ³â '+(month+1)+' ¿ù</b>'); // ¿ùÀº month+1 document.write('</font></td></tr><tr>') for (i=0;i<=6;i++){ // °¢ ¿äÀÏÀÇ Ä­À» ¸¸µë document.write('<td class=week>'+ ((i==0)?'<font color=red>':'')+ // ùĭ(0)ÀÌ¸é ÆùÆ®»ö red ¾Æ´Ï¸é null('') weekdays.substring(i,i+1)+ // weekdays¿¡¼­ 1ÀÚ¾¿ ²÷¾î ¿äÀÏ Ç¥½Ã '</td>'); } document.write('</tr><tr align=center>'); // ¿äÀÏ Ä÷³ ´Ý°í ÀÏÀÚ Ä÷³ ¿­±â column=0; // Ä÷³À» ù°ĭÀ¸·Î ¼³Á¤ for (i=0;wkdy1>i;i++){ // ÀÏÀÚ¸¦ ¿ùÃÊ(1ÀÏ) ¿äÀÏ Àü±îÁö ¹Ýº¹ document.write('<td> </td>'); // ºóÄ­ ¸¸µé±â column++; // Ä÷³ 1 Áõ°¡ } for ( i=1; i<=monthEnd; i++){ // ÀÏÀÚ Ä­ 1 ºÎÅÍ ¿ù ±æÀ̱îÁö ¹Ýº¹ document.write( '<td class='+ // Ä­ ½ÃÀÛ ((i==day) ? 'today' : // ÀÏÀÚ°¡ ¿À´Ã°ú °°À¸¸é class=today ((column==0) ? 'sun' : // ¾Æ´Ï°í (0¹ø Ä÷³À̸é class=sun ((column==6) ? 'sat' : // ¾Æ´Ï°í (6¹ø Ä÷³À̸é class=sat 'normal')))+ // ¾Æ´Ï¸é class=normal) '>'+i+'</td>'); // ÀÏÀÚ ³Ö°í Ä­¸¶°¨ column++; // Ä÷³ 1 Áõ°¡ if(column==7){ // Ä÷³ÀÌ 7ÀÌ¸é ±× ÁÙ ³¡³»°í »õÁÙ ¿­±â document.write('</tr><tr>'); column=0; // Ä÷³À» ù°ĭÀ¸·Î ¼³Á¤ } } // for loop Á¾·á for (i=column;i<=6;i++){ // Á¾·áµÈ Ä÷³¿¡¼­ ¸¶Áö¸· Ä÷³±îÁö ºóÄ­ ³Ö±â document.write('<td> </td>'); } document.write('</tr></table>'); // ÁÙ ¸¶°¨ document.write('<table align=center><tr><td class=bottom>'+ '<font size=2>¿À´ÃÀº <b>'+year+'</b> ³â <b>'+(month+1)+'</b> ¿ù<b>'+ day+'</b> ÀÏ <b>'+ ((wkdy==0) ? 'Áñ°Å¿î <font color=red>' : '')+ weekdays.substring(wkdy,wkdy+1)+'</b>¿äÀÏ</font></td></tr>'); } // °¨Ãã ³¡ --> </script> <style type="text/css"> td.today { color: red; font-weight:bold; background-color:fe8; border:solid thin 1pt; border-color:#fff #f00 #f00 #fff; } td.normal{ color: #088; font-weight:bold; background-color:eeddff; border:solid thin 1pt; border-color:#eef #88c #88c #eef; } td.sun{ color: #880000; font-weight:bold; background-color:ffeedd; border:solid thin 1pt; border-color:#fee #c88 #c88 #fee; } td.sat{ color: #088; font-weight:bold; background-color:f8d8ee; border:solid thin 1pt; border-color:#fee #c88 #c88 #fee; } td.week{ color: #008; font-weight:bold; background-color:eee; border:solid thin 1pt; border-color:#fff #ccc #ccc #fff; } td.bottom{ color: #066; background-color:eeeeee; border:solid thin 1pt; border-color:#fff #ccc #ccc #fff; } </style> </head> <body> <a name="top"></a> <center> <table width=100% border=1><tr align=center> <td width=30 class=heada><a href="http://trio.co.kr/" target="_top"><img src="../../gif/ictrio.gif" border=0 alt="Trio ȨÆäÀÌÁö"></a></td> <td class=head></span>´Þ·Â ¸¸µé±â ¿¹Á¦</td> <td align=right width=30 class=heada><a href="../js/jxexp.html" target=main><img src="../../gif/arexp.gif" border=0 width=30 alt="Javascript ¿¹Á¦ ¸ÞÀÎÆäÀÌÁö"></a></td></tr></table> <table class=main><tr><td> <img src=../gif/rfbtexm2.gif><br> <table align=center border=1 cellspacing=3 bgcolor=ddeeff class=calendar style="border:solid thin 2pt; border-color: #eff #88f #88f #eef;"> <script>calendar();</script> </td></tr></table> <hr class="bara"> <pre class=teal> <img src="../gif/rfcoding.gif" border=0 alt="HTML Code"><br> À̺κÐÀÇ ÄÚµåºÎºÐÀ¸·Î Áߺ¹µÇ¹Ç·Î »ý·« </pre> </td></tr></table> <hr class="bara"> <div class=blockdown style="border-width:1.5pt;"> <div class=box><table width=95%> <tr align="center" valign="middle"> <td><a href="http://trio.co.kr/" target="_top"><img src="http://trio.co.kr/gif/ictrio.gif" border=0 height=20 alt="¹ø¿ª¹® ¼ÒÀ¯ÀÚ - Trio ȨÆäÀÌÁö"></a> Á¦°ø</td> <td class="linkok"> ÀÌ ¹®¼­(http://trio.co.kr/webrefer/jsex/xcondi.html)´Â<br> ÀÚÀ¯·ÎÀÌ ¿¬°á »ç¿ëÀÌ °¡´ÉÇÔ.</td> <td align=right width=32><a href="../js/jxexp.html"><img src="../../gif/arexp.gif" border=0 height=30 alt="¿¹Á¦ ¸Þ´º·Î"></a> </td></tr></table></div></div> </center> <a name="bottom"></a> </body> </html>

¹ø¿ª¹® ¼ÒÀ¯ÀÚ - Trio ȨÆäÀÌÁö Á¦°ø ÀÌ ¹®¼­(http://trio.co.kr/webrefer/jsex/xcondi.html)´Â
ÀÚÀ¯·ÎÀÌ ¿¬°á »ç¿ëÀÌ °¡´ÉÇÔ.
¿¹Á¦ ¸Þ´º·Î