作成者カテゴリ 
公開
べガ
12/08/1999 02:53 PM
クライアント
ノーツサーバノーツクライアントサーバOSクライアントOSネットワークプロトコル
5.x5.xWindowsNT 4.0Windows 95TCP/IP

java scriptの書き方

java scriptを下のように書きコンパイルもうまくいく
のですが、実行すると、
This feature is not yet implementedと
メッセージが出てしまいます
java scriptを初めて書いてのですが
JS Headerのイベントにかきました。
他に設定などがあるのですか?

unction calcDays(fromDate, toDate) {
var elapse = toDate.getTime() - fromDate.getTime();
//ミリ秒を日数に変換
return Math.ceil(elapse/(24*60*60*1000));
}

var today = new Date();
// 今年のクリスマスのDateオブジェクトの生成
var Xmas = new Date(today.getYear(), 11, 25);

var daysLeft =calcDays(today, Xmas);

if (daysLeft == 0){
document.write("クリスマスおめでとう", "<BR>");
} else if (daysLeft >= 1){
document.write("クリスマスまであと");
document.write(daysLeft, "日です", "<BR>");
} else {
document.write("クリスマスは終わりました", "<BR>");
}





[Previous Main Document]
java scriptの書き方 (べガ) * 現在地 *
[Next Main Document]