- 浏览: 794269 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (651)
- Java (39)
- Java 初学者小问题 (66)
- 设计模式 (7)
- 项目管理 (3)
- 数据库 (1)
- 算法 (2)
- Java practices (6)
- Effective Java2读书笔记 (78)
- Linux (2)
- programming ruby 读书笔记 (5)
- Core Java Ninth Edition Volume I 读书笔记 (15)
- Pro Git 读书笔记 (12)
- Git (3)
- Maven in Action 读书笔记 (20)
- Web (12)
- 非技术类书籍 (11)
- 电影 (40)
- Web Cache (1)
- jquery (0)
- 历史 (4)
- Dive Into HTML5 读书笔记 (13)
- 三国演义小学毕业考 (79)
- 高效能人士的7个习惯 读书笔记 (12)
- Java Performance 读书笔记 (3)
- Protocol Buffer 学习笔记 (6)
- Mongo DB 学习笔记 (7)
- Morphia 学习笔记 (7)
- Algorithms -- Princeton 学习笔记 (13)
- String研究 (10)
- Hadoop: The Definitive Guide 读书笔记 (3)
- Java与模式读书笔记 (5)
- Date研究 (3)
- The Roman Empire 听课笔记 (4)
- Algorithms -- Standford 学习笔记 (16)
- Core Java Ninth Edition Volume II 读书笔记 (9)
- Thinking in Java 4th Edition 读书笔记 (21)
- Node : Up and Running 学习笔记 (5)
- Eloquent Javascript (8)
- Smashing Node.js 读书笔记 (1)
- Algorithms II -- Standford 学习笔记 (19)
- Algorithm II -- Princeton 学习笔记 (14)
- 网络安全 (2)
- Javascript (4)
- 正则表达式 (1)
- JAVA 7/8 (15)
- JVM (10)
- NodeJS (1)
- 鸟哥的linux私房菜读书笔记 (14)
- Web Service (1)
- The art of programming (9)
- Introduction to Algorithm 读书笔记 (4)
- Java 源码阅读 (0)
- Spring in Action 读书笔记 (2)
- Java Network Programming 读书笔记 (2)
最新评论
-
心存高远:
谢谢作者分享,刚好看到这里不太明白,现在茅塞顿开。不过runt ...
关于 Maven的传递依赖的理解 -
sxlkk:
851228082 写道甚至在某次技术会议现场遇到《Maven ...
关于 Maven的传递依赖的理解 -
851228082:
851228082 写道a----compile----b-- ...
第五章 坐标和依赖 -
851228082:
a----compile----b-----provided- ...
第五章 坐标和依赖 -
851228082:
甚至在某次技术会议现场遇到《Maven in action》的 ...
关于 Maven的传递依赖的理解
1. Placeholder text is displayed inside the input field as long as the field is empty. When you click on (or tab to) the input field and start typing, the placeholder text disappears. Here’s how you can include placeholder text in your own web forms:
<form> <input name="q" placeholder="Go to a Website"> <input type="submit" value="Search"> </form>
Browsers that don’t support the placeholder attribute will simply ignore it. No harm, no foul. The placeholder attribute can only contain text, not HTML markup.
2. When you press the space bar expecting to scroll the page, the page will not scroll if the focus is already in a form input field due to site’s autofocus script. (It types a space in the field instead of scrolling.) If you focus a different input field while the page is still loading, the site’s autofocus script may “helpfully” move the focus back to the original input field, disrupting your flow and causing you to type in the wrong place. HTML5 introduces an autofocus attribute on all web form controls. The autofocus attribute does exactly what it says on the tin: as soon as the page loads, it moves the input focus to a particular input field. But because it’s just markup instead of script, the behavior will be consistent across all web sites.
3. If you want your autofocus fields to work in all browsers, not just these fancy-pants HTML5 browsers, you can do this:
<form name="f"> <input id="q" autofocus> <script> if (!("autofocus" in document.createElement("input"))) { document.getElementById("q").focus(); } </script> <input type="submit" value="Go"> </form>
The window.onload event doesn’t fire until after all your images have loaded. Placing the auto-focus script immediately after the form field that it references is the optimal solution. If you can’t insert a script in the middle of your page, you should set focus during a custom event like jQuery’s $(document).ready() instead of window.onload .
4. HTML5 defines 13 new field types, the first of these is for email address:
<form> <input type="email"> <input type="submit" value="Go"> </form>
Every single browser on Earth treats an unknown type attribute as type="text" — even IE 6. The HTML5 specification doesn’t mandate any particular user interface for the new input types. Most desktop browsers simply render it as a text box. Apple did something clever in the iPhone’s web browser. It recognizes several of the new HTML5 input types, and dynamically changes the on-screen keyboard to optimize for that kind of input. When you use an iPhone and focus an <input type="email"> element, you get an on-screen keyboard that contains a smaller-than-usual space bar, plus dedicated keys for the @ and . characters.
5.
The iPhone altered its virtual
keyboard when you focus an <input type="url">
. The space bar
has been completely replaced with three virtual keys: a period(.
), a forward
slash, and a “.com
” button. (You can long-press the “.com
” button to choose
other common suffixes like “.org
” or “.net
”.) Most modern desktop browsers
simply render
type="url"
like a regular text box.
6. HTML5 has provided a powerful number input:
<input type="number" min="0" max="10" step="2" value="6">
min="0" specifies the minimum acceptable value for this field. max="10" is the maximum acceptable value. step="2" , combined with the min value, defines the acceptable numbers in the range: 0, 2, 4, and so on, up to the max value. value="6" is the default value. The default step value is 1. You also get these handy JavaScript methods as well:
a) input.stepUp(n) increases the field’s value by n .
b) input.stepDown(n) decreases the field’s value by n .
c) input.valueAsNumber returns the current value as a floating point number. (The input.value property is always a string.)
On the iPhone, the browser optimizes the virtual keyboard for numeric input. In the desktop version of Opera, the same type="number" field is rendered as a “spinbox” control.
7. You can now have slider controls in your web forms:
<input type="range" min="0" max="10" step="2" value="6">
All the available attributes are the same as type="number" .The only difference is the user interface. Instead of a field for typing, browsers are expected to render type="range" as a slider control.
8. HTML5 finally defines a way to include a native date picker control without having to script it yourself. In fact, it defines six: date, month, week, time, date + time, and date + time - timezone.
9. If you’re using Safari on Mac OS X, the input box for type=”search” has rounded corners. When you actually start typing into the type="search" box, Safari inserts a small “x ” button on the right side of the box. Clicking the “x ” clears the contents of the field.
10. HTML5 also defines <input type="color"> , which lets you pick a color and returns the color’s hexadecimal representation.
11. W
hen the user tries to submit a
form with an <input type="email">
field, the browser
automatically offers RFC
-compliant email validation, even if
scripting is disabled. HTML5 also offers validation of web addresses
entered into <input type="url">
fields, and numbers in <input
type="number">
fields. The validation of numbers even takes into
account the min and max attributes, so browsers will not let you submit the
form if you enter a number that is too large. To turn it off, use the
novalidate
attribute:
<form novalidate> <input type="email" id="addr"> <input type="submit" value="Subscribe"> </form>
12. You can also specify that certain fields are required. Required fields must have a value before you can submit the form:
<form> <input id="q" required> <input type="submit" value="Search"> </form>
发表评论
-
《Dive into HTML5》 读后感
2012-06-20 07:57 1509读这本书的起因是参加了2012年的Qcon,对其中某个 ... -
Manipulating History for Fun & Profit
2012-06-20 07:29 10501. The HTML5 history AP ... -
“Distributed,”“Extensibility,”& Other Fancy Words
2012-06-15 15:54 8901. Microdata annotates t ... -
Let’s Take This Offline
2012-06-09 23:32 9341. An offline web app ... -
A Place To Put Your Stuff
2012-06-09 17:55 9341. Cookies have three po ... -
You Are Here (And So Is Everybody Else)
2012-06-09 16:06 11131. Geolocation is the ar ... -
Video in a Flash (Without That Other Thing)
2012-06-08 15:46 11181. HTML5 defines a standard wa ... -
Let’s Call It A Draw(ing Surface)
2012-06-06 17:19 11881. HTML 5 defines the &l ... -
What Does It All Mean?
2012-06-03 19:23 10811. In Activating Browse ... -
Detecting HTML5 Features
2012-05-24 19:05 10731. There are four basic ... -
A Quite Biased History of HTML5
2012-05-23 20:02 10841. “content type” or “MIM ... -
Introduction: Five Things You Should Know About HTML5
2012-05-22 15:23 10091. HTML5 is a collectio ...
相关推荐
《疯狂射手》(Stickman Madness)是一款基于Flash技术开发的在线射击游戏,以其独特的故事情节和挑战性深受玩家喜爱。在这个游戏中,玩家扮演的角色不再是传统意义上的英雄,而是一位勇敢的女主角,她的任务是营救被...
这包括减少多边形数量、优化光照、使用LOD(Level of Detail)层次细节系统,以及合理利用资源加载和卸载机制。 通过深入研究和实践“Roller Madness”这个Unity3D示例项目,开发者不仅能掌握游戏开发的基本技能,...
zoj 3531 Alice Madness Return.md
基于Java的MadNess项目 项目简介 MadNess项目是一个基于Java的NCAA季后赛括号赛管理系统,专注于管理玩家、队伍、比赛和数据集。通过使用Apache Derby数据库,项目实现了数据的初始化、管理、编辑和展示。 主要...
【标题】"march_madness_pickem-源码.rar" 暗示这是一个与“疯狂三月”(March Madness)相关的项目,March Madness通常指的是美国大学篮球联赛NCAA的年度锦标赛。源码可能是一个应用程序或网站,允许用户进行比赛...
nba madness - 主页 通过安装nba madness,您将获得来自NBA联赛的社交媒体,新闻和实时分数,加上Web搜索,100%免费在您的Chrome新建 标签扩展。 “替换您在打开新标签时看到的页面” 这允许我们向您展示我们的...
我们希望将来能制作几款游戏,并且一直在寻找新的团队成员。
【标题】"MM2021:March Madness BracketWeb抓取" 涉及的是一个使用Python进行网络数据抓取的项目,特别是针对体育赛事中“三月疯狂”(March Madness)篮球比赛的赛程支架(Bracket)信息的抓取。在体育竞技中,尤其...
递归下降到疯狂疯狂是一种Swift µframework,用于解析简单的无上下文语法中的字符串。 组合来自简单Swift表达式的解析器并进行... 有关使用Madness进行解析的一些示例,请参见Madness.playground 。采用乐兴Madness
「WEB应用防火墙」Mobile MFA Madness Mobile Device Hygiene and MFA Integrity Challenges - 工控安全 信息安全 漏洞分析 WAF 安全意识 系统安全
$ alias madness= ' docker run --rm -it -v $PWD:/docs -p 3000:3000 dannyben/madness ' 设计意图Madness的设计目的是为了轻松浏览,查看和搜索基于markdown的本地文档目录。 功能亮点易于使用。 内置全文本搜索...
When I began writing this book, I spent quite a bit of time searching for a good quote to start things off. I ended up with two. R is a wonderfully flexible platform and language for exploring, ...
首先,标题“信息安全_数据安全_Mobile MFA Madness Mobile Device.pdf”揭示了文档将围绕信息安全和数据安全展开讨论,并专门关注移动设备上的多因素认证问题。标题中的“Mobile MFA Madness”表达了一种对当前移动...
多智能体分布式SANE系统的学术项目
介绍 此存储库包含一个脚本mbox2es.py ,该脚本采用包含电子邮件集合的 .mbox 格式文件,并将其索引到在 localhost:9200 上运行的 elasticsearch 实例到索引mail 。 它还包含一个脚本gmvault2es.py ,该脚本采用工具...
"madness" 是一个专为 Tokio 设计的异步 Mdns 库。Mdns,即 Multicast DNS,是一种基于 DNS 协议的本地网络服务发现技术,它允许设备在无需集中式 DNS 服务器的情况下进行服务发现和通信。Tokio 是一个用于构建异步...
该仓库包含AR Madness的代码,这是一个ARKit游戏,您可以在其中拍摄像浴盆和鲨鱼这样的愚蠢事物,以及像香蕉和斧头这样的愚蠢事物! 我们最初在都柏林为Coder Dojo Coolest Projects 2018构建了游戏,并决定将代码...
Kaggle March Madness机器学习2018 描述 Google Cloud和NCAA:registered:联手为您带来了今年的Kaggle机器学习竞赛版本。 再过一年,又有一次机会可以预料到烦恼,打电话给概率以及将方括号论技能用于排行榜测试。 ...
《疯狂三月数据分析:预测March Madness的顶尖球队》 在篮球界,每年的三月份,全美大学篮球联赛(NCAA)都会举行一场名为“疯狂三月”(March Madness)的淘汰赛,吸引着全世界篮球迷的目光。在这个项目中,我们将...