検索

===CALENDAR HTC===

 
<HEAD> 
<?IMPORT NAMESPACE="ANYDAY" IMPLEMENTATION="day.htc"/> 
<?IMPORT NAMESPACE="TODAY" IMPLEMENTATION="today.htc"/> 

<PUBLIC:COMPONENT tagName="CALENDAR"> 
<ATTACH EVENT="oncontentready" ONEVENT="fnInit()"/> 
</PUBLIC:COMPONENT> 

<SCR<a href="http://ip.knowsky.com/">ip</a>T LANGUAGE="<a href="http://www.knowsky.com/article.asp?typeid=160">java</a>Script"> 
<!-- 
function fnInit() { 
defaults.viewLink = document; 
} 
// --> 
</SCRIPT> 

<STYLE> 
TD { 
background-color:tan; 
width:50; 
height:50; 
} 
</STYLE> 
</HEAD> 

<BODY> 
<SCRIPT LANGUAGE="<a href="http://www.knowsky.com/article.asp?typeid=36">Javascript</a>"> 
<!-- 

// Copyright 1997 -- Tomer Shiran 

setCal(); 

function leapYear(year) { 
if (year % 4 == 0) {// basic rule 
return true; // is leap year 
} 
/* else */ // else not needed when statement is "return" 
return false; // is not leap year 
} 

function getDays(month, year) { 
// create array to hold number of days in each month 
var ar = new Array(12); 
ar[0] = 31; // January 
ar[1] = (leapYear(year)) ? 29 : 28; // February 
ar[2] = 31; // March 
ar[3] = 30; // A<a href="http://pr.knowsky.com/">PR</a>il 
ar[4] = 31; // May 
ar[5] = 30; // June 
ar[6] = 31; // July 
ar[7] = 31; // August 
ar[8] = 30; // September 
ar[9] = 31; // October 
ar[10] = 30; // November 
ar[11] = 31; // December 

// return number of days in the specified month (parameter) 
return ar[month]; 
} 

function getMonthName(month) { 
// create array to hold name of each month 
var ar = new Array(12); 
ar[0] = "January"; 
ar[1] = "February"; 
ar[2] = "March"; 
ar[3] = "April"; 
ar[4] = "May"; 
ar[5] = "June"; 
ar[6] = "July"; 
ar[7] = "August"; 
ar[8] = "September"; 
ar[9] = "October"; 
ar[10] = "November"; 
ar[11] = "December"; 

// return name of specified month (parameter) 
return ar[month]; 
} 

function setCal() { 
// standard time attributes 
var now = new Date(); 
var year = now.getFullYear(); 
var month = now.getMonth(); 
var monthName = getMonthName(month); 
var date = now.getDate(); 
now = null; 

// create instance of first day of month, and extract the day on which it occurs 
var firstDayInstance = new Date(year, month, 1); 
var firstDay = firstDayInstance.getDay(); 
firstDayInstance = null; 

// number of days in current month 
var days = getDays(month, year); 

// call function to draw calendar 
drawCal(firstDay + 1, days, date, monthName, year); 
} 

function drawCal(firstDay, lastDate, date, monthName, year) { 
// constant table settings 
//var headerHeight = 50 // height of the table&#39;s header cell 
var border = 2; // 3D height of table&#39;s border 
var cellspacing = 4; // width of table&#39;s border 
var headerColor = "midnightblue"; // color of table&#39;s header 
var headerSize = "+3"; // size of tables header font 
var colWidth = 60; // width of columns in table 
var dayCellHeight = 25; // height of cells containing days of the week 
var dayColor = "darkblue"; // color of font representing week days 
var cellHeight = 40; // height of cells representing dates in the calendar 
var todayColor = "red"; // color specifying today&#39;s date in the calendar 
var timeColor = "purple"; // color of font representing current time 

// create basic table structure 
var text = ""; // initialize accumulative variable to empty string 
text += &#39;<TABLE BORDER=&#39; + border + &#39; CELLSPACING=&#39; + cellspacing + &#39;>&#39;; // table settings 
text += &#39;<TH COLSPAN=7 HEIGHT=&#39; + 10 + &#39;>&#39;; // create table header cell 
text += &#39;<FONT COLOR="&#39; + headerColor + &#39;" SIZE=&#39; + headerSize + &#39;>&#39;; // set font for table header 
text += monthName + &#39; &#39; + year; 
text += &#39;</FONT>&#39;; // close table header&#39;s font settings 
text += &#39;</TH>&#39;; // close header cell 

// variables to hold constant settings 
var openCol = &#39;<TD WIDTH=&#39; + colWidth + &#39; HEIGHT=&#39; + dayCellHeight + &#39;>&#39;; 
openCol += &#39;<FONT COLOR="&#39; + dayColor + &#39;">&#39;; 
var closeCol = &#39;</FONT></TD>&#39;; 

// create array of abbreviated day names 
var weekDay = new Array(7); 
weekDay[0] = "Sun"; 
weekDay[1] = "Mon"; 
weekDay[2] = "Tues"; 
weekDay[3] = "Wed"; 
weekDay[4] = "Thu"; 
weekDay[5] = "Fri"; 
weekDay[6] = "Sat"; 

// create first row of table to set column width and specify week day 
text += &#39;<TR ALIGN="center" VALIGN="center">&#39;; 
for (var dayNum = 0; dayNum < 7; ++dayNum) { 
text += openCol + weekDay[dayNum] + closeCol; 
} 
text += &#39;</TR>&#39;; 

// declaration and initialization of two variables to help with tables 
var dayOfMonth = 1; 
var curCell = 1; 

for (var row = 1; row <= Math.ceil((lastDate + firstDay - 1) / 7); ++row) { 
text += &#39;<TR ALIGN="right" VALIGN="top">&#39;; 
for (var col = 1; col <= 7; ++col) { 
if ((curCell < firstDay) || (dayOfMonth > lastDate)) { 
text += &#39;<TD></TD>&#39;; 
curCell++ 
} else { 
if (dayOfMonth == date) { // current cell represents today&#39;s date 
text += &#39;<TD><TODAY:DAY value=&#39; + dayOfMonth + &#39;></TODAY:DAY></TD>&#39;; 
} else { 
text += &#39;<TD><ANYDAY:DAY value=&#39; + dayOfMonth + &#39;></ANYDAY:DAY></TD>&#39;; 
} 
dayOfMonth++; 
} 
} 
text += &#39;</TR>&#39;; 
} 

// close all basic table tags 
text += &#39;</TABLE>&#39;; 
text += &#39;</CENTER>&#39;; 

// print accumulative HTML string 
document.write(text); 
} 

// --> 
</SCRIPT> 
</BODY> 
</HTML>

上記は HTML COMPONENTS 7 の内容です。その他の関連記事については、PHP 中国語 Web サイト (www.php.cn) に注目してください。


声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
テキストからウェブサイトへ:HTMLの力テキストからウェブサイトへ:HTMLの力Apr 13, 2025 am 12:07 AM

HTMLは、Webページを構築するために使用される言語であり、タグと属性を使用してWebページの構造とコンテンツを定義します。 1)htmlは、などのタグを介してドキュメント構造を整理します。 2)ブラウザはHTMLを分析してDOMを構築し、Webページをレンダリングします。 3)マルチメディア関数を強化するなど、HTML5の新機能。 4)一般的なエラーには、閉じられていないラベルと引用されていない属性値が含まれます。 5)最適化の提案には、セマンティックタグの使用とファイルサイズの削減が含まれます。

HTML、CSS、およびJavaScriptの理解:初心者向けガイドHTML、CSS、およびJavaScriptの理解:初心者向けガイドApr 12, 2025 am 12:02 AM

webdevelopmentReliesOnhtml、css、andjavascript:1)htmlStructuresContent、2)cssStylesit、および3)Javascriptaddsinteractivity、形成、

HTMLの役割:Webコンテンツの構造HTMLの役割:Webコンテンツの構造Apr 11, 2025 am 12:12 AM

HTMLの役割は、タグと属性を使用してWebページの構造とコンテンツを定義することです。 1。HTMLは、読みやすく理解しやすいようなタグを介してコンテンツを整理します。 2。アクセシビリティとSEOを強化するには、セマンティックタグなどを使用します。 3. HTMLコードの最適化により、Webページの読み込み速度とユーザーエクスペリエンスが向上する可能性があります。

HTMLとコード:用語を詳しく見るHTMLとコード:用語を詳しく見るApr 10, 2025 am 09:28 AM

htmlisaspecifictypeofcodefocuseduructuringwebcontent

HTML、CSS、およびJavaScript:Web開発者に不可欠なツールHTML、CSS、およびJavaScript:Web開発者に不可欠なツールApr 09, 2025 am 12:12 AM

HTML、CSS、およびJavaScriptは、Web開発の3つの柱です。 1。HTMLは、Webページ構造を定義し、などなどのタグを使用します。2。CSSは、色、フォントサイズなどのセレクターと属性を使用してWebページスタイルを制御します。

HTML、CSS、およびJavaScriptの役割:コアの責任HTML、CSS、およびJavaScriptの役割:コアの責任Apr 08, 2025 pm 07:05 PM

HTMLはWeb構造を定義し、CSSはスタイルとレイアウトを担当し、JavaScriptは動的な相互作用を提供します。 3人はWeb開発で職務を遂行し、共同でカラフルなWebサイトを構築します。

HTMLは初心者のために簡単に学ぶことができますか?HTMLは初心者のために簡単に学ぶことができますか?Apr 07, 2025 am 12:11 AM

HTMLは、簡単に学習しやすく、結果をすばやく見ることができるため、初心者に適しています。 1)HTMLの学習曲線はスムーズで簡単に開始できます。 2)基本タグをマスターして、Webページの作成を開始します。 3)柔軟性が高く、CSSおよびJavaScriptと組み合わせて使用​​できます。 4)豊富な学習リソースと最新のツールは、学習プロセスをサポートしています。

HTMLでの開始タグの例は何ですか?HTMLでの開始タグの例は何ですか?Apr 06, 2025 am 12:04 AM

Anexampleapalofastartingtaginhtmlis、それはaperginsaparagraph.startingtagsaresentionentientiontheyinitiateelements、definetheirtypes、およびarecrucialforurturingwebpagesandcontingthomedomを構築します。

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。

EditPlus 中国語クラック版

EditPlus 中国語クラック版

サイズが小さく、構文の強調表示、コード プロンプト機能はサポートされていません

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

WebStorm Mac版

WebStorm Mac版

便利なJavaScript開発ツール