HTML and CSS Reference
In-Depth Information
You might expect 5 + 3 to be 8, but because the form values are strings,
you aren't performing addition—you're performing concatenation. It's
relatively straightforward to work around the issue in HTML4, but why
should you have to? HTML5 provides the properties valueAsDate and
valueAsNumber so that you can get directly at the values you need.
Browser support and detecting HTML5 features
Unlike the structural elements we looked at in chapter 1, the new form
elements have more complex associated behavior and API s. The struc-
tural elements merely had to exist; these form elements have to do
something for you to be able to say a browser supports them. With
these more complex requirements, it's not surprising that support isn't
yet as far advanced as it might be. The following table shows the level
of support in the current and, where known, upcoming versions of all
the major browsers.
12
14
4
6
8
9
10
11.1
11.5
5
5.1
Input types
Validation API
Placeholder
Autofocus
Input UI
Range
Meter
Progress
Output
Key:
● Complete or nearly complete support
○ Incomplete or alternative support
Little or no support
 
Search WWH ::




Custom Search