Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
html5 新技术
Search
hugo
November 27, 2013
Programming
180
3
Share
html5 新技术
主要介绍了html的一些新增属性和api
hugo
November 27, 2013
More Decks by hugo
See All by hugo
CSS命名及书写规范
baofen14787
0
690
移动端性能调优及16ms优化
baofen14787
1
2.3k
html5 新技术 2
baofen14787
1
150
html5 新技术 3
baofen14787
1
110
Other Decks in Programming
See All in Programming
3分でわかるatama plusのQA/about atama plus QA
atamaplus
0
160
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
470
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
210
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
270
「接続」—パフォーマンスチューニングの最後の一手 〜点と点を結ぶ、その一瞬のために〜
kentaroutakeda
5
2.5k
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
330
Rethinking API Platform Filters
vinceamstoutz
0
11k
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
490
感情を設計する
ichimichi
5
1.4k
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
200
Make GenAI Production-Ready with Kubernetes Patterns
bibryam
0
120
CDK Deployのための ”反響定位”
watany
4
730
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
5.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Building AI with AI
inesmontani
PRO
1
890
Agile that works and the tools we love
rasmusluckow
331
21k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
380
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
230
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Optimizing for Happiness
mojombo
378
71k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
170
Un-Boring Meetings
codingconduct
0
260
Designing Powerful Visuals for Engaging Learning
tmiket
1
340
Transcript
HTML5新技术(1) hugohua
data-*** 符合html5规范 高级浏览器支持 js提供dataset方法 jq提供data方法
CSS提供attr() 方法
dataset *带连字符连接的名称在使用的时候需要命名驼峰化
$(‘’).data() *data方法,页面初始化时缓存数据,后续无法修改属性值。 参考文献: http://www.learningjquery.com/2011/09/using-jquerys-data-apis
CSS attr() DEMO
Demo
datalist *扩展阅读: http://www.zhangxinxu.com/wordpress/2013/03/html5-datalist-实际应用-可行性/
download
download Download属性:表明一个资源是让用户下载的,而不是立即显示的。 Download如果存在值,则这个值是文件名。 DEMO
下载动态生成的文件 可以通过Bob创建二进制文件,然后用这个属性下载到本地。
autofocus Autofocus:页面加载时自动地获得焦点。 仅对 input、button、textarea等表单元素有效 多个autofocus存在时,作用于最后一个 DEMO
placeholder 文本框默认文字提示 默认颜色在各浏览器下表现不一致,建议通过CSS重置样式 DEMO
Context Menus Chrome暂不支持 DEMO
None
HTML5 JS API • 未完待续 • 3Q