Начало
Детали страницы
Время Приветствие
JavaScript можете написать доброе утро, добрый вечер, или добрый день и т д
JavaScript Page Details: Время Приветствие
<!-- ONE STEP TO INSTALL TIME GREETING: 1. Copy the coding into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the BODY of your HTML document --> <BODY> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin datetoday = new Date(); timenow=datetoday.getTime(); datetoday.setTime(timenow); thehour = datetoday.getHours(); if (thehour > 18) display = "Evening"; else if (thehour >12) display = "Afternoon"; else display = "Morning"; var greeting = ("Good " + display + "!"); document.write(greeting); // End --> </script> <!-- Script Size: 0.79 KB -->