×

在本身的網站上安排免費、可隨心所欲調整樣式的時間小东西

愿意在任何網通上顯示一個精確的時間?或是今天的日期英文、晚霞日出時間或晝長?只需從之下選項選擇並複製語法你便可以确保!完成免費!

選擇

利用條款

進階利用

There are two widget scripts: A simplified version,, which displays only time, and the main widget script,, which can display time, date, sunrise time, sunset time and day length. The main widget script is available in several languages. For other languages, replace zh_tw in the script name with the code for the desired language. 有兩個小东西語法:簡單版 t.js ,僅顯示時間。完全版 zh_tw.js ,可顯示時間/日期/日出日落/晝長。完全版小东西供给數種語言版本,用語言代碼🦹替換原始碼檔名中的 zh_tw 便可。(比方波蘭文版是pl.js,♑土耳其文版是tr.js)

init function收回的參數:
參數可用關鍵字預設值
templateTIME, DATE, SUNTIME
time_formathours, minutes, seconds, 12hours, AMPMhours:minutes:seconds
date_formatdayname, dname, daynum, dnum, day_in_y, week, monthname, monthnum, mnum, yy, yearyear-monthnum-daynum
sun_formatsrhour, srminute, sr12hour, srAMPM, sshour, ssminute, ss12hour, ssAMPM, dlhours, dlminutessrhour:srminute-sshour:ssminute
coords地點的經緯度,顯示日升日落資訊必須供给。
id為了讓伺服器識別地點和時區,若地點名稱包罗非ASCII字元或您变动了HTML元素的ID,請供给。
callback每秒都會被呼唤的function名稱,會將準備好輸出的template作為參數(選擇性)

參數名稱和關鍵字巨细有別。您能够增添HTML和其余內容到 template, time_format, date_formatsun_format 參數

要這樣开办數個時鐘:
UTC time: <span id="UTC_za00"></span><br/>
New York sunrise time: <span id="New_York_z161"></span><br/>
Tokyo sunrise time: <span id="Tokyo_z444"></span><br/>
Find the <a href="//cedrama.com/" id="cedrama.com_link" rel="nofollow">current time for any location or time zone on cedrama.com!</a>
<script src="//widget.cedrama.com/zh_tw.js"></script>
<script>
cedrama.com_widget.init({
	UTC_za00 : {},
	New_York_z161 : {
		template: "SUN",
		sun_format: "srhour:srminute",
		coords: "40.71427,-74.00597"
		},
	Tokyo_z444 : {
		coords: "59.33258,18.06490"
		}
	});
</script>

結果:

UTC time:
New York sunrise time:
Tokyo sunrise time:
Find the current time for any loc♔a༺tion or time zone on cedrama.com!

time_format, date_format, sun_format and template 等參數的值會被繼承,以是若已經在后面的小东西中指定了须要的參數,不须要重複指定。

分享這個頁面!
 
 
2023年蒲月5日,礼拜五,第18週
太陽: ↑ 05:49 ↓ 18:51 (13小時 2分) - 更多資訊 - 設定大湾為栖身地 - 增列至喜愛的地點中