Skip to Content
MOBILE HTML5學習手冊
book

MOBILE HTML5學習手冊

by Estelle Weyl
June 2014
Intermediate to advanced
488 pages
9h 56m
Chinese
GoTop Information, Inc.
Content preview from MOBILE HTML5學習手冊
HTML5 Web 表單
|
113
日期與時間輸入類型
目前有一些新的日期及時間輸入類型,包括
date
datetime
datetimelocal
month
time
week
。所有時間都是以 ISO 8601 日期為基礎。支援這些類型的瀏覽器會複製設
備的原生行事曆 widget,提供互動的 widget。在線上章節資源上,有所有日期∕時間類
型的範例程式。
date
的值比任何其他的日期及時間輸入類型更受到各種瀏覽器的支援。
日期:<input type="date">
date
輸入類型提供一個具有年、月、日的日期(沒有時間、星期幾或時區)。預設的使
用者介面外觀是一個日期控制項。當瀏覽器支援它時,會提供一個行事曆控制項。
不同的文化會使用不同的方式來書寫他們的日期。雖然有一些瀏覽器控制項會將月份放
在最前面,有些會將日期放在最前面,但是在日期被傳到伺服器之前,都會先被轉換成
一致的 YYYY-MM-DD 格式:
<p>
<label for="date">Date: </label>
<input id="date" name="date" type="date"
placeholder="YYYY-MM-DD" required />
</p>
<p>
<label for="dob">Date of Birth: </label>
<input id="dob" name="dob" type="date"
placeholder="YYYY-MM-DD" min="1900-01-01" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JAVASCRIPT網頁應用程式設計

JAVASCRIPT網頁應用程式設計

Alex MacCaw

Publisher Resources

ISBN: 9789863471240