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 表單
|
131
wrap
HTML5 的新屬性,
<textarea>
元素可以使用
wrap
屬性,這個屬性可以設為
soft
值(預設)、讓被傳送的文字裡面除了使用者刻意按下的分行符號之外,沒有其他分行
符號的
hard: soft
,及含有刻意的分行符號的
hard
。如果你將
wrap
設定為
hard
,請指
定一個
cols
屬性。
HTML 4,我們必須指定
rows
cols
來設定螢幕上
<textarea>
的大小。但是在
HTML5 中,
<textarea>
元素的
rows
cols
屬性已經不是必要的屬性了,因為它們屬於
HTML 4,除非你將
wrap
屬性設成
hard
才需要
cols
屬性,否則現在的
cols
rows
是選
用的。你應該改用 CSS 來定義寬與高。這個元素的封閉標籤是必要的。
<button>
<button>
元素有三種類型:
submit
reset
button
(預設值是
submit
)。
<button>
元素
<input type="button"/>
不一樣,它不是自動封閉的:你必須使用
</button>
封閉標
籤。這個元素與之前的版本一樣,沒有任何改變。
<label> 元素
<label>
元素不是新的 HTML5 元素,但是因為它經常被濫用,所以值得在此討論。
<label>
可以在使用者介面上提供表單控制項的說明文字。你可以使用
for
屬性來連結顯
式標籤,或將表單控制項放在
<label>
元素裡面建立一個隱式標籤,來結合說明文字與
特定的表單控制項。
顯示標籤的
for
屬性值必須符合表單控制項的 ...
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