![]() |
|
| |||||||
|
| | Seçenekler |
|
#1
| ||||
| | ||||
javascript ile sayfada tarih göstermeformat: Sunday, November 25, 2007 HTML-Kodu: <!-- ONE STEP TO INSTALL BASIC DATE DISPLAY: 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"> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Author: www.cgiscript.net --> <!-- Begin // Get today's current date. var now = new Date(); // Array list of days. var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); // Array list of months. var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December'); // Calculate the number of the current day in the week. var date = ((now.getDate()<10) ? "0" : "")+ now.getDate(); // Calculate four digit year. function fourdigits(number) { return (number < 1000) ? number + 1900 : number; } // Join it all together today = days[now.getDay()] + ", " + months[now.getMonth()] + " " + date + ", " + (fourdigits(now.getYear())) ; // Print out the data. document.write(today); // End --> </script> <p><center> <font face="arial, helvetica" size"-2">Free JavaScripts provided<br> by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </center><p> <!-- Script Size: 1.30 KB --> |
|
#2
| ||||
| | ||||
| format: November 25, 2007 HTML-Kodu: <!-- Paste this code into an external JavaScript file named: dateDisplay.js.js --> /* This script and many more are available free online at The JavaScript Source :: http://javascript.internet.com Created by: Lee Underwood :: http://javascript.internet.com/ */ function displayDate() { var now = new Date(); var today = now.getDate(); var month = now.getMonth(); var monthName = new Array(12) monthName[0]="January "; monthName[1]="February "; monthName[2]="March "; monthName[3]="April "; monthName[4]="May "; monthName[5]="June "; monthName[6]="July "; monthName[7]="August "; monthName[8]="September "; monthName[9]="October "; monthName[10]="November "; monthName[11]="December "; var year = now.getFullYear(); document.write(monthName[month]+today+ ", "+year); } <!-- Paste this code into the BODY section of your HTML document where you want the date displayed --> <script type="text/javascript"> <!-- displayDate(); //--> </script> |
![]() |
| Arama Etiketleri: gosterme, javascript, sayfada, tarih |
| Seçenekler | |
| |
Benzer Konular | ||||
| Konu | Konu Açanlar | Forum | Cevaplar | Güncel Mesajlar |
| Sayfada yagmur | Miliotta | Html kodları | 2 | 01-08-2008 12:00 |
| javascript ile sayfada geçirilen zamanı hesaplayan kod | banias | Javascript kodları | 0 | 26-11-2007 12:32 |
| javascript rastgele resim gösterme kodu | banias | Javascript kodları | 3 | 23-11-2007 12:48 |
| (javascript) sayfada matrix kodları | banias | Javascript kodları | 0 | 23-11-2007 12:34 |
| Basit Tarih Gösterme [php] | Nurullah_ | Php kodları | 0 | 07-09-2007 04:36 |
![]() |