HTML5 APPLICATIONS DEVELOPMENT MANUAL
It features two APIs: JSON.parse and JSON.stringify. When data is received from a server, the .parse API is used to read the dat ...
30 - Loading and Saving Files Validating Uploaded Files With JavaScript you can load and save files from your computer. JavaScri ...
JavaScript accesses local files AppCache for Offline Files Data can be stored locally when a user is offline using the Appli ...
Validating User Input Form input may be incorrect. Example: Users may forget the @ symbol in an email address. JavaScript can be ...
case 4: case 8: case 11: if (last_character != '-') { value = value.substring(0, current_length - 1); } break; default: if (!/\d ...
Cookies Cookies are small text files that that Web sites save on your computer. They contain information about you and your pref ...
welcome.innerHTML = message; level_object.value = level; } function save_level() { setCookie("level", level_object.value, 10); } ...
function init() { var message; level_object = document.getElementById("level"); var welcome = document.getElementById("welcome" ...
31 - Responding to the Touch Interface Devices with touch interfaces have screens that are developed specifically for sensing to ...
Tap Left-click Tap a finger on the screen Double tap Left double- click Tapping a finger on the screen twice Press and hold Righ ...
touch event. You can use JavaScript to create touch events in touch-enabled apps. Developers can draw from a large set of input ...
fired; for example, in a touchend event, this is the finger that was removed Detecting a Touch Screen <!doctype html> De ...
...
32 - Coding Additional HTML5 APIs WHATWG is a consortium that was formed by Apple, the Mozilla Foundation, and Opera Software to ...
position. The example below returns the latitude and longitude of the user's position: <!DOCTYPE html> Click the button ...
Web Workers A web worker is a JavaScript running in the background, without affecting the performance of the page. <!DOCTYPE ...
function sayHello() { alert("Hello sir...."); } doWork.js onmessage = function (event) { var info = event.data; var result ...
WebSocket API The WebSocket API creates a simultaneous two-way connection between a client and a Web server. This type of connec ...
// Connected, send data socket.send("Connected"); alert("Connected."); }; socket.onmessage = function (e) { var received_msg = e ...
closed. File API The File API allows Web applications to upload files from local storage to remote servers. The File API feature ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf