Game Development Reference
In-Depth Information
As of this topic, the following are some native features that modern browsers support
(more detail about these features will be given in the following chapters, but this list
should give you a good foretaste of what is to come).
Automatic form validation
You tell the browser the exact format that your want user input to be in, and the
browser will enforce that format. Any invalid input provided (based on your settings),
and the browser will even report back to the user, letting the user know what went
wrong.
New input types
Collect data from the user in a variety of formats beyond text, lists, or checkboxes
and radio buttons. For values within a given numerical range, you can use a slider
input (also known as a range input). You can also take precise input related to dates,
colors, telephone numbers, or e-mail addresses. All it takes to specify such restric-
tions in your input is a single HTML element attribute.
Telephone-friendly hyperlinks
When browsing through text documents, the browser has always been very good at
navigating from one document to the next. All it takes to tell the browser where to
go next is an anchor tag. Now that smart phones make up nearly half of all Internet
usage in some parts of the world, a hyper link can have a different context—such
as telling your device to dial a number, for example. With HTML5 you can tell that
same anchor tag to treat its link as a phone number to be called, similar to how you
currently tell it to treat its resource as an email address.
CSS-based DOM selectors
Unless you have lived under a rock for the past five years or so, you will have heard
of, and possibly used the most popular JavaScript library today—jQuery. One of the
main reasons that jQuery has become so popular, and has gained such wide accept-
ance by web developers, is the revolutionary way in which it allows you to access
DOM elements. Before jQuery, the three most common ways of accessing DOM ele-
ments were as follows:
Search WWH ::




Custom Search